[luatex] luatex problem with file with umlauts on windows 10
Philip Taylor
P.Taylor at Hellenic-Institute.Uk
Sat Apr 25 17:48:53 CEST 2020
Ulrike Fischer wrote:
> After removing the two comments (--) it works fine, both in miktex and texlive.
Also for me (in TeX Live only) but the console-log output is distinctly sub-optimal in TeXworks when reporting the file name from within LuaTeX at */print ("\string \n FILE: ", file)/* :
> This is LuaTeX, Version 1.12.0 (TeX Live 2020/W32TeX)
>
> restricted system commands enabled.
>
> (./untitled-4.tex (./grüße.tex)
>
> FILE: ./gr��e.tex
>
> SIZE: 11
>
> isfile true
>
> [1{c:/TeX/Live/2020/TeX-MF/Var/fonts/map/pdftex/updmap/pdftex.map}])
>
> (see the transcript file for additional information)
> <c:/TeX/Live/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
>
> Output written on untitled-4.pdf (1 page, 11393 bytes).
>
>
> SyncTeX written on untitled-4.synctex.gz.
>
> Transcript written on untitled-4.log.
>
TeXworks and LuaTeX lists cc'd, source follows :
% UTF-8
\directlua
{
local function is_texlive ()
local a = kpse.var_value ('command_line_encoding')
if a
then
return true
else
return false
end
end
local function is_windows ()
local a = package.config:sub (1,1)
if a == '/'
then
return false
elseif a == ':'
then
return false
else
return true
end
end
function myfilesize (name)
local file = kpse.find_file (name, "tex", true)
if is_windows () and is_texlive ()
then
local g = chgstrcp.utf8tosyscp (file)
file = g
end
print ("\string \n FILE: ", file)
if file
then
local size = lfs.attributes (file, "size")
local isfile= lfs.isfile (file)
print ("SIZE: ", size)
print ("isfile ", isfile)
end
end
}
\input {grüße}
\directlua {myfilesize ("grüße.tex")}
\end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20200425/9a359644/attachment.html>
More information about the luatex
mailing list.