summaryrefslogtreecommitdiff
path: root/tex/context/base/l-unicode.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-09-27 23:00:27 +0300
committerMarius <mariausol@gmail.com>2011-09-27 23:00:27 +0300
commit0526f4b53574cd916c133899b611422d487c6047 (patch)
treee001d6921223d7703b0889ffb539e4423d0d324f /tex/context/base/l-unicode.lua
parentb0780a3e1545ad2dd2e6087d2fc5ad2a70257f8e (diff)
downloadcontext-0526f4b53574cd916c133899b611422d487c6047.tar.gz
beta 2011.09.27 20:05
Diffstat (limited to 'tex/context/base/l-unicode.lua')
-rw-r--r--tex/context/base/l-unicode.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tex/context/base/l-unicode.lua b/tex/context/base/l-unicode.lua
index 6295ecb7d..246171aec 100644
--- a/tex/context/base/l-unicode.lua
+++ b/tex/context/base/l-unicode.lua
@@ -218,7 +218,7 @@ local function utf16_to_utf8_be(t)
if right then
local now = 256*left + right
if more > 0 then
- now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000
+ now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 -- the 0x10000 smells wrong
more = 0
r = r + 1
result[r] = utfchar(now)
@@ -246,7 +246,7 @@ local function utf16_to_utf8_le(t)
if right then
local now = 256*right + left
if more > 0 then
- now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000
+ now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 -- the 0x10000 smells wrong
more = 0
r = r + 1
result[r] = utfchar(now)