\endlinechar can't be set to non-ASCII values.
Hi, the following program barfs and gets confused: \endlinechar128 \relax \relax \end This is luaTeX, Version 3.141592-snapshot-2007040210 (Web2C 7.5.6) (INITEX) (/tmp/junk.tex ! Buffer contains an invalid utf-8 sequence. l.2 \ relax ? ! Undefined control sequence. l.2 \rel ax ? ! Buffer contains an invalid utf-8 sequence. l.2 \relax ? ! Buffer contains an invalid utf-8 sequence. l.3 \ relax ? ! Undefined control sequence. l.3 \rel ax ? ! Buffer contains an invalid utf-8 sequence. l.3 \relax ? ! Buffer contains an invalid utf-8 sequence. l.4 \ end ? ! Undefined control sequence. l.4 \e nd ? ! Buffer contains an invalid utf-8 sequence. l.4 \end ? ) * ! Emergency stop. <*> /tmp/junk.tex No pages of output. Transcript written on junk.log. Maybe it would be better if buffer was an array of ASCII rather than packedASCII, namely encoded in UTF21 (or whatever) internally rather than UTF8. As it stands, dealing with \endlinechar and the end of buffer will not exactly be a lot of fun. Or one will need a function that is going to place a single character into buffer, and one needs to take care that at all times at least 4 (rather than one) characters remain free whenever \endlinechar has not yet been appended. -- David Kastrup
Taco Hoekwater
David Kastrup wrote:
Maybe it would be better if buffer was an array of ASCII rather than packedASCII, namely encoded in UTF21 (or whatever) internally rather than UTF8.
No. And thanks for the bug report, will fix.
The hilarious thing is how I found it. LaTeX's inputenc package does the following when loading an input encoding definition: \advance\endlinechar\@M \xdef\saved@space@catcode{\the\catcode`\ }% \catcode`\ 9\relax \input{#1.def}% \advance\endlinechar-\@M \catcode`\ \saved@space@catcode\relax Of course, advancing \endlinechar by 10000 is not quite far enough for LuaTeX... Separate report to LaTeX team is out. -- David Kastrup
participants (2)
-
David Kastrup
-
Taco Hoekwater