utf-16 bug fixed
svn: r985
This commit is contained in:
parent
50a666ebd9
commit
f39c5010ef
|
@ -4227,8 +4227,8 @@ unsigned short *scheme_ucs4_to_utf16(const mzchar *text, int start, int end,
|
||||||
for (i = start, j = 0; i < end; i++) {
|
for (i = start, j = 0; i < end; i++) {
|
||||||
v = text[i];
|
v = text[i];
|
||||||
if (v > 0xFFFF) {
|
if (v > 0xFFFF) {
|
||||||
utf16[j++] = 0xD8000 | ((v >> 10) & 0x3FF);
|
utf16[j++] = 0xD800 | ((v >> 10) & 0x3FF);
|
||||||
utf16[j++] = 0xDC000 | (v & 0x3FF);
|
utf16[j++] = 0xDC00 | (v & 0x3FF);
|
||||||
} else
|
} else
|
||||||
utf16[j++] = v;
|
utf16[j++] = v;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user