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:
@@ -1135,7 +1135,7 @@ wxMBConvStrictUTF8::FromWChar(char *dst, size_t dstLen,
|
||||
out[0] = 0xC0 | code;
|
||||
}
|
||||
}
|
||||
else if ( code < 0xFFFF )
|
||||
else if ( code <= 0xFFFF )
|
||||
{
|
||||
len = 3;
|
||||
if ( out )
|
||||
|
||||
Reference in New Issue
Block a user