Correct UTF-8 encoding of U+FFFF
Overlong (and hence invalid) 4-byte encoding was used for this character instead of the correct 3-byte 0xEF 0xBF 0xBF sequence. Fix this by using 3 bytes for the code points up to 0xFFFF included, instead of excluding it as was done before. Closes #17920.
This commit is contained in:
@@ -431,7 +431,7 @@ wxScopedCharBuffer wxUString::utf8_str() const
|
||||
{
|
||||
utf8_length += 2;
|
||||
}
|
||||
else if ( code < 0xFFFF )
|
||||
else if ( code <= 0xFFFF )
|
||||
{
|
||||
utf8_length += 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user