We don't get partial 2-byte and 3-byte UTF8 characters quite correct, fataling instead of returning false because we access past the end of the string.
Instead, bail early if we run off the end of the string without seeing any issues.
Differential D8321
Fix phutil_is_utf8_with_only_bmp_characters() for partial valid characters epriestley on Feb 24 2014, 7:27 PM. Authored by Tags None Referenced Files
Subscribers
Details We don't get partial 2-byte and 3-byte UTF8 characters quite correct, fataling instead of returning false because we access past the end of the string. Instead, bail early if we run off the end of the string without seeing any issues. Added and executed unit tests.
Diff Detail
|