# \scantokens in LuaTeX

The eTeX `\scantokens` command appears to work differently in LuaTeX than it does in eTeX, pdfTeX and XeTeX. Compiling the following test file with any engine other than LuaTeX performs `\show+`, which shows `the character +`, but LuaTeX skips this statement entirely.

``````\newlinechar=10 \catcode10=12
\endlinechar=13 \catcode13=5
\scantokens{^^J\show+}
\bye
``````

This behaviour reminds me of how TeX does not look in a line after tokens of category code 5 (end-of-line), so at first I thought that the default category codes might be different in LuaTeX. This is why I added some redundant catcode assignments. Obviously, that didn't suffice.

-

This is a known bug in the LuaTeX implementation of `\scantokens`: http://tracker.luatex.org/view.php?id=733 (taking pdfTeX as a 'reference' behaviour and therefore correct by definition).