<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Ulrike Fischer wrote:<br>
</div>
<blockquote type="cite" cite="mid:1n8upta61fdvc$.dlg@nililand.de">
<pre wrap="">Am Sun, 26 Apr 2020 11:00:50 +0100 schrieb Philip Taylor:
</pre>
<blockquote type="cite">
<pre wrap="">Trying to understand why Akira-san had written :
</pre>
<blockquote type="cite">
<pre wrap="">
local function is_texlive ()
local a = kpse.var_value ('command_line_encoding')
if a
then
return true
else
return false
end
end
</pre>
</blockquote>
<pre wrap="">
rather than
</pre>
<blockquote type="cite">
<pre wrap=""> local function is_texlive ()
local a = kpse.var_value ('command_line_encoding')
return a
end
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
because a is = "utf-8" and not "true" in texlive. </pre>
</blockquote>
<br>
Thank you Ulrike. But if <i>within</i> the function <i>is_texlive
()</i> one can ask <i>if a</i>, where <i>a</i> = "utf-8", why
can one not ask that outside of <i>is_texlive ()</i> ? In other
words, at the point of the call of <i>is_texlive ()</i> [<i><tt>if
is_windows () and is_texlive ()</tt></i>], why would a return
value of "utf-8" not cause the <i>if</i> to take the true branch,
just as it does <i>within</i> Akita-san's coding of <i>is_texlive
()</i> ?<br>
<blockquote type="cite" cite="mid:1n8upta61fdvc$.dlg@nililand.de">
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap="">
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.
</pre>
</blockquote>
<br>
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 !<br>
<br>
<i>** Phil.</i><br>
</body>
</html>