[luatex] luatex problem with file with umlauts on windows 10
Philip Taylor
P.Taylor at Hellenic-Institute.Uk
Sun Apr 26 17:31:13 CEST 2020
Ulrike Fischer wrote:
> Am Sun, 26 Apr 2020 11:00:50 +0100 schrieb Philip Taylor:
>
>> Trying to understand why Akira-san had written :
>>
>>> local function is_texlive ()
>>> local a = kpse.var_value ('command_line_encoding')
>>> if a
>>> then
>>> return true
>>> else
>>> return false
>>> end
>>> end
>> rather than
>>
>>> local function is_texlive ()
>>> local a = kpse.var_value ('command_line_encoding')
>>> return a
>>> end
> because a is = "utf-8" and not "true" in texlive.
Thank you Ulrike. But if /within/ the function /is_texlive ()/ one can ask /if a/, where /a/ = "utf-8", why can one not ask that outside of /is_texlive ()/ ? In other words, at the point of the call of /is_texlive ()/ [/if is_windows () and is_texlive ()/], why would a return value of "utf-8" not cause the /if/ to take the true branch, just as it does /within/ Akita-san's coding of /is_texlive ()/ ?
>> Could a Lua expert possibly explain why OFILE is reporting 'nil'
>> for "grüße.tex", please ? Both are in the directory from which I
>> am issuing the TeXLua command.
> Because as Akira mentioned in a later posting kpse in a texlua
> script handles file names differently than kpse in a luatex
> document. You need to convert the file name before passing it to
> kpse.
Thank you, yes, spotted that after I asked the question. But although my raw Lua can now open "grüße.tex", it reports a mangled name to the console, and also to the console within TeXworks. This is all very messy !
/** Phil./
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20200426/c83e19f4/attachment.html>
More information about the luatex
mailing list.