I have file foo.txt with a single byte inside: x. Here is my code:
\documentclass{article}
\begin{document}
\newread\foo
\immediate\openin\foo=foo.txt
\read\foo to \content
\immediate\closein\foo
\message{content: [\content]^^J}%
\end{document}
It prints in the log:
content: [x ]
Why this extra space after x? How to get rid of it?
x%in the file, or set\endlinecharlocally to -1 when reading. – Ulrike Fischer Oct 23 '22 at 15:57\endlinecharand I will be glad to accept it – yegor256 Oct 23 '22 at 15:58