bugsnag / bugsnag-php

BugSnag error monitoring and crash reporting tool for PHP apps
https://docs.bugsnag.com/platforms/php
MIT License
554 stars 77 forks source link

Allow PHP 7.2+ to handle invalid UTF-8 #662

Closed imjoehaines closed 1 year ago

imjoehaines commented 1 year ago

Goal

Follow up to #661 to make use of the PHP 7.2+ JSON_INVALID_UTF8_SUBSTITUTE flag, which means we don't have to try to cleanup invalid UTF-8 ourselves

I've also changed our use of mb_convert_encoding to guess the string's encoding, rather than assume ISO-8859-1