#20933
atnak
Participant

cat command probably produces the EOF

cat is really only an example. (Although what I said above is true for the cat.exe that I have.)

The outcome is the similar with various other commands:

SqlFormatter.exe regurgitates the 0x1A to the output.

python.exe -m json.tool complains about “Extra data” at the exact line and column where that 0x1A byte is expected to be.

This simple C# program will output the 0x1A on the end if specified through EmEditor’s “External Tools”. It will not do this if called through command prompt such as ‘Program.exe <a.txt >b.txt‘.

static class Program
{
    static void Main(string[] args)
    {
        for (int c; (c = System.Console.Read()) != -1;)
        {
            System.Console.Write((char)c);
        }
    }
}