[luatex] Null bite doesn't write to file
Phelype Oleinik
phe.h.o1 at gmail.com
Thu Mar 5 13:07:59 CET 2020
Hi all,
When writing a null byte to a file, as in `\immediate\write\test{abc^^@def}`,
the tokens after the null byte are not written (because of C's \0 string
termination, I suppose?). The code:
\newwrite\test
\immediate\openout\test=testfile.tex
\catcode`\^^@=12
\immediate\write\test{abc def}
\immediate\write\test{abc^^@def}
\closeout\test
\bye
when run with LuaTeX produces testfile.tex with:
abc def
abc
whereas pdfTeX and XeTeX it produces:
abc def
abc^^@def
(or something like that, depending on the -8bit flag).
Is it a bug? Can it be reasonably fixed?
Cheers
---
Phelype
More information about the luatex
mailing list.