I am seeing some other issues with `\read` as well. For example,
`\def\first{hello world}` (notice the two spaces) will store 11 tokens
"hello␣world" in `\first` but storing `hello world` in a text file named
`example.txt` and reading that file with `\newread\example
\openin\example=example.txt \read\example to\second` in LuaMetaTeX stores 13
tokens "hello␣␣world\n" in `\second`. LuaTeX and other TeX engines would store
just 12 tokens "hello␣world\n". This is less of an issue than the one described
in the original post and can likely be fixed by using `\scantokens` on
`\second`.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________