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

Reply via email to