Subject: bug#51669: some patterns which should match 0x0 don’t do so

From: Paul Eggert <[email-masked]>
Date: Sun, 7 Nov 2021 23:20:24 -0800

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.