OSDN Git Service

luatexja-fontspec-*.sty: forgot to update \setmonojfont
[luatex-ja/luatexja.git] / src / ltj-compat.lua
index bc8ac9d..bd79854 100644 (file)
@@ -18,6 +18,7 @@ end
 
 
 -- \kuten, \jis, \euc, \sjis, \ucs, \kansuji
+local utfchar=utf.char
 local function to_kansuji(num)
    if not num then num=0; return
    elseif num<0 then
@@ -25,7 +26,7 @@ local function to_kansuji(num)
    end
    local s = ""
    while num~=0 do
-      s = utf.char(
+      s = utfchar(
         ltjs.get_stack_table(luatexja.stack_table_index.KSJ + num%10,
                                '', tex.getcount('ltj@@stack'))) .. s
       num=math.floor(num/10)
@@ -110,7 +111,7 @@ local function from_sjis(i)
        if c1>0x7f then i=0x40 else i=0x3f end
        c1 = c1 - i
      else
-       c1 = c1 - 0x7e
+       c1 = c1 - 0x9e
      end
      from_kuten(c2*256+c1)
   end