The idea of ββpatterns of incorrectly formed byte sequences can be obtained from a table of well-formed byte sequences. See " Table 3-7. Well-formed UTF-8 byte sequences " in Unicode Standard 6.2.
Code Points First Byte Second Byte Third Byte Fourth Byte U+0000 - U+007F 00 - 7F U+0080 - U+07FF C2 - DF 80 - BF U+0800 - U+0FFF E0 A0 - BF 80 - BF U+1000 - U+CFFF E1 - EC 80 - BF 80 - BF U+D000 - U+D7FF ED 80 - 9F 80 - BF U+E000 - U+FFFF EE - EF 80 - BF 80 - BF U+10000 - U+3FFFF F0 90 - BF 80 - BF 80 - BF U+40000 - U+FFFFF F1 - F3 80 - BF 80 - BF 80 - BF U+100000 - U+10FFFF F4 80 - 8F 80 - BF 80 - BF
Here are examples created from U + 24B62. I used them to report an error: Error # 65045 mb_convert_encoding crashes a well-formed character
// U+24B62: "\xF0\xA4\xAD\xA2" "\xF0\xA4\xAD" ."\xF0\xA4\xAD\xA2"."\xF0\xA4\xAD\xA2" "\xF0\xA4\xAD\xA2"."\xF0\xA4\xAD\xA2"."\xF0\xA4\xAD"
In different libraries, you can see a simplification of the range of finite bytes ([0x80, 0xBF]).
// U+0800 - U+0FFF \xE0\x80\x80 // U+D000 - U+D7FF \xED\xBF\xBF // U+10000 - U+3FFFF \xF0\x80\x80\x80 // U+100000 - U+10FFFF \xF4\xBF\xBF\xBF
masakielastic Jun 19 '13 at 6:59 a.m. 2013-06-19 18:59
source share