On 11/7/21 16:45, Christoph Anton Mitterer wrote:

why is 0x00 different from 0x02?
POSIX says text files cannot contain NUL bytes. They can contain 0x02 bytes, though.

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_403

More generally, in a POSIX system any method for deciding whether a file is text vs binary is to some extent a heuristic, and there will always be corners in any such heuristic.



Reply via email to