You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In utf8makevalid, you use the following test to identify a 4 sequence bytes
"if (0xf0 == (0xf8 & *read))"
This is not correct if you suppose that you can have any invalid string as an input parameter, since only a few values in f0-ff ranges are valid.
Moreover, for valid values in f0-ff ranges, possible values for second byte are not the same one. For example, with f0, valid range for second byte is 90..bf, instead of 80..bf
Regards
The text was updated successfully, but these errors were encountered:
Hello,
In utf8makevalid, you use the following test to identify a 4 sequence bytes
"if (0xf0 == (0xf8 & *read))"
This is not correct if you suppose that you can have any invalid string as an input parameter, since only a few values in f0-ff ranges are valid.
Moreover, for valid values in f0-ff ranges, possible values for second byte are not the same one. For example, with f0, valid range for second byte is 90..bf, instead of 80..bf
Regards
The text was updated successfully, but these errors were encountered: