<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 14 Jan 2023 at 10:27, luigi scarso <<a href="mailto:luigi.scarso@gmail.com">luigi.scarso@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 13 Jan 2023 at 22:36, Vítek Novotný <<a href="mailto:witiko@mail.muni.cz" target="_blank">witiko@mail.muni.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear LuaTeX developers,<br>
<br>
assume the following plain TeX document `example.tex`:<br>
<br>
    \newwrite\outfile<br>
    \openout\outfile\jobname.out<br>
    \write\outfile{^^^^fffd}<br>
    \closeout\outfile<br>
    \bye<br>
<br>
Running `luatex example` will correctly produce file `example.out` with the<br>
UTF-8 encoding of U+FFFD: 0xEF, 0xBF, and 0xBD.<br>
<br>
    $ hexdump -C<br>
    00000000  ef bf bd 0a                                       |....|<br>
    00000004<br>
<br>
Now, let's change `example.tex` as follows:<br>
<br>
    \input\jobname.out<br>
    \bye<br>
<br>
Running `luatex example` produces the following error:<br>
<br>
    ! String contains an invalid utf-8 sequence.<br>
<br>
I would expect that LuaTeX would treat ^^^^fffd and the byte sequence 0xEF,<br>
0xBF, and 0xBD the same. This issue was co-discovered by @lostenderman at<br>
<<a href="https://github.com/lostenderman/markdown/issues/34" rel="noreferrer" target="_blank">https://github.com/lostenderman/markdown/issues/34</a>>.<br>
<br></blockquote><div><br></div><div>hm, checking it now.</div><div><br></div></div></div></blockquote><div><br></div><div>hm I am not able to reproduce the error... My log says,  <br>Missing character: There is no � (U+FFFD) in font cmr10!<br></div><div>but luatex  exits fine</div><div><br></div><div> $ luatex --credits</div>This is LuaTeX, Version 1.15.1 (TeX Live 2023/dev)<br><br>The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso.<br><br>LuaTeX merges and builds upon (parts of) the code from these projects:<br><br>tex       : Donald Knuth<br>etex      : Peter Breitenlohner, Phil Taylor and friends<br>omega     : John Plaice and Yannis Haralambous<br>aleph     : Giuseppe Bilotta<br>pdftex    : Han The Thanh and friends<br>kpathsea  : Karl Berry, Olaf Weber and others<br>lua       : Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo<br>metapost  : John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen and friends<br>pplib     : Paweł Jackowski<br>fontforge : George Williams (partial)<br>luajit    : Mike Pall (used in LuajitTeX)<br><br>Compiled with libpng 1.6.39; using 1.6.39<br>Compiled with lua version 5.3.6<br>Compiled with mplib version 2.02<br>Compiled with zlib 1.2.13; using 1.2.13<br><br>Development id: 7554<br></div></div>