diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua index 0d7cecbb853..91636ad04e0 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-aux.lua @@ -22,7 +22,8 @@ local cache = table.setmetatableindex(function(t,k) -- can be made weak if v < 0x10000 then v = format("%04x",v) else - v = format("%04x%04x",rshift(v,10),v%1024+0xDC00) + v = v - 0x10000 + v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00) end t[k] = v return v @@ -71,7 +72,7 @@ local more = 0 local pattern = C(4) / function(s) -- needs checking ! local now = tonumber(s,16) if more > 0 then - now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 -- the 0x10000 smells wrong + now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 more = 0 return utfchar(now) elseif now >= 0xD800 and now <= 0xDBFF then |