On 5/16/2014 10:41 PM, Joseph Wright wrote:
Hello all,
Running some tests today I stumbled across the following issue. With the
demo:
\def\test{\luaescapestring{\noexpand\foo}}
\escapechar=-1\relax
\test
I get
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014) (rev 4971)
restricted \write18 enabled.
(./test.tex
! String contains an invalid utf-8 sequence.
test ^^@-luaescapestring {noexpand foo }
l.3 \test
?
I was as you'd imagined a bit surprised: I spent a while looking over my
source for dodgy input before concluding there is something more subtle up.
Is this in some way deliberate or a bug?
\escapechar= 65 : \test == Afoo
\escapechar= 66 : \test == Bfoo
\escapechar=466 : \test == ǒfoo
so,
\escapechar=66 : \test == <utfchar -1>foo
and that is invalid; of course one can argue that -1 should then result
in no character (in which case one can wonder what then the Lua escape
character is)
I've added a tracker/
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------