mirror of
https://github.com/TangentFoxy/love-pe.git
synced 2025-07-28 10:12:16 +00:00
Tiny fix in the UTF-16 decoder
This commit is contained in:
@@ -89,7 +89,7 @@ local function decodeUTF16(str16)
|
|||||||
local lowPair = iter()
|
local lowPair = iter()
|
||||||
|
|
||||||
if lowPair and lowPair >= 0xDC00 and lowPair <= 0xDFFF then
|
if lowPair and lowPair >= 0xDC00 and lowPair <= 0xDFFF then
|
||||||
unicode = lshift(unicode-0xD800,10) + (lowPair-0xDC00)
|
unicode = lshift(unicode-0xD800,10) + (lowPair-0xDC00) + 0x01000
|
||||||
nstr[#nstr+1] = utf8.char(unicode)
|
nstr[#nstr+1] = utf8.char(unicode)
|
||||||
unicode = iter()
|
unicode = iter()
|
||||||
else --Unpaired surrogate
|
else --Unpaired surrogate
|
||||||
|
Reference in New Issue
Block a user