<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Ulrike Fischer wrote:<br>
<br>
</div>
<blockquote type="cite" cite="mid:xhyjon1h0572$.dlg@nililand.de">After
removing the two comments (--) it works fine, both in miktex and
texlive.<br>
</blockquote>
<br>
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 <b><tt><i>print ("\string \n FILE: ", file)</i></tt></b>
:<br>
<br>
<blockquote type="cite">This is LuaTeX, Version 1.12.0 (TeX Live
2020/W32TeX)
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
restricted system commands enabled.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">(./untitled-4.tex
(./grüße.tex)</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">FILE:
./gr��e.tex</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">SIZE: 11</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">isfile
true</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
[1{c:/TeX/Live/2020/TeX-MF/Var/fonts/map/pdftex/updmap/pdftex.map}])</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">(see the
transcript file for additional information)<br>
<c:/TeX/Live/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Output
written on untitled-4.pdf (1 page, 11393 bytes).</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">SyncTeX
written on untitled-4.synctex.gz.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Transcript
written on untitled-4.log.</p>
</blockquote>
<br>
TeXworks and LuaTeX lists cc'd, source follows :<br>
<br>
<tt>% UTF-8<br>
\directlua<br>
{<br>
local function is_texlive ()<br>
local a = kpse.var_value ('command_line_encoding')<br>
if a <br>
then<br>
return true<br>
else<br>
return false<br>
end<br>
end<br>
local function is_windows ()<br>
local a = package.config:sub (1,1)<br>
if a == '/' <br>
then<br>
return false<br>
elseif a == ':' <br>
then<br>
return false<br>
else<br>
return true<br>
end<br>
end<br>
function myfilesize (name)<br>
local file = kpse.find_file (name, "tex", true)<br>
if is_windows () and is_texlive ()<br>
then<br>
local g = chgstrcp.utf8tosyscp (file)<br>
file = g<br>
end<br>
print ("\string \n FILE: ", file)<br>
if file <br>
then<br>
local size = lfs.attributes (file, "size")<br>
local isfile= lfs.isfile (file)<br>
print ("SIZE: ", size)<br>
print ("isfile ", isfile)<br>
end<br>
end<br>
}<br>
<br>
\input {grüße}<br>
\directlua {myfilesize ("grüße.tex")}<br>
</tt><br>
<tt>\end</tt><br>
</body>
</html>