#41425 UTF-8 converter gets surrogates wrong

correct unicode upper boundary
r=ftang, sr=blizzard
This commit is contained in:
shanjian%netscape.com 2002-08-26 20:32:13 +00:00
Родитель 4f7fff8b3c
Коммит 11926238f0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -198,7 +198,7 @@ static PRUnichar* UTF8ToUCS2(const char *aSrc, PRUint32 aSrcLen,
ucs4 |= tmp;
if (0 == state) {
if (ucs4 >= 0x00010000) {
if (ucs4 >= 0x001F0000) {
if (ucs4 >= 0x00110000) {
*out++ = 0xFFFD;
} else {
ucs4 -= 0x00010000;