I think I might have found it out by myself.

Thinking about the EOF byte in Windows, (EOF = End Of File)
Windows sees the byte 0x1A as the EOF of a text file, so I might have to open the file in binary mode.