diff options
Diffstat (limited to 'CPP/Common/UTFConvert.cpp')
-rwxr-xr-x | CPP/Common/UTFConvert.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CPP/Common/UTFConvert.cpp b/CPP/Common/UTFConvert.cpp index 9d1fd005..95362430 100755 --- a/CPP/Common/UTFConvert.cpp +++ b/CPP/Common/UTFConvert.cpp @@ -99,7 +99,7 @@ static Bool Utf16_To_Utf8(char *dest, size_t *destLen, const wchar_t *src, size_ c2 = src[srcPos++]; if (c2 < 0xDC00 || c2 >= 0xE000) break; - value = ((value - 0xD800) << 10) | (c2 - 0xDC00); + value = (((value - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000; } for (numAdds = 1; numAdds < 5; numAdds++) if (value < (((UInt32)1) << (numAdds * 5 + 6))) |