[luatex] lualatex fails with fontfile named in utf8

Dohyun Kim nomosnomos at gmail.com
Wed Jun 10 10:18:31 CEST 2009

2009/6/10 Taco Hoekwater <taco at elvenkind.com>:
> Hi Dohyun Kim,
> Taco Hoekwater wrote:
>> How can I create this lualatex format, for testing?
> I just did a small test with plain luatex (luatex \&plain,
> to be exact), and it has no problem with loading either
> 나눔고딕.tex or 나눔고딕.tfm (a rename of cmr10.tfm),
> nor does it report gibberish if either of these cannot
> be found, so it looks like this is a latex-specific thing.
> Perhaps it is re-encoding the file names internally somehow?

No, latex does not re-encode the file name.
It just make it cs-named: something like \csname 나눔고딕\endcsname,
after which the file name becomes weird characters.
Each of utf8 octets now becomes unicode two byte character.
0xea 0xb0 0x80 => U+00EA U+00B0 U+0080.

Anyway, making lualatex format is simple.

=== luatexiniconfig.tex ===
\expandafter\ifx\csname luatexversion\endcsname\relax
  \directlua{tex.enableprimitives('', tex.extraprimitives())}

=== lualatex.ini ===
\input luatexiniconfig.tex
\input pdftexconfig
\pdfoutput=0  % dvi output by default
\input latex.ltx

then, run the command "luatex -ini lualatex.ini".

More information about the luatex mailing list