[luatex] string.char

Paul Isambert zappathustra at free.fr
Mon Apr 4 18:32:58 CEST 2011


Le 04/04/2011 18:14, Heiko Oberdiek a écrit :
> Hello,
>
> I have some obscure problem with string.char:
>
> % luatex -ini
> \catcode`\{=1
> \catcode`\}=2
> \newlinechar=-1
>
> \directlua{tex.settoks(0, string.char(65, 0, 66))}
> \message{\the\toks0}
>
> \csname @@end\endcsname\end
>
>
> As result I expect "A^^@B", but I get "A^^@^^@".
> All bytes after the first zero are ^^@ (zero byte).
>
> Tested with luatex 0.60.2 and 0.65.0.

No answer, but an additional observation: LuaTeX 0.66 (rev. 4087) with 
your code complains about an invalid UTF-8 sequence and then prints 
"A^^@" followed by some gibberish. But if I simply add another 65 before 
the 0, then it doesn't complain, but prints AA^^@^^@. That smells like bug.

Best,
Paul


More information about the luatex mailing list