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

2021-11-07 Thread Christoph Anton Mitterer
Hey. Maybe this is no a bug at all due grep rather being focused on text files and 0x0 being special anyway, but just for your information: $ hd test-with-0x00-and-0x02 66 6f 6f 0a 62 61 72 0a 7a 65 02 00 0a 62 61 7a |foo.bar.ze...baz| 0010 0a 7a 65 72 00 0a 65 6e 64 0a

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

2021-11-07 Thread Christoph Anton Mitterer
On Sun, 2021-11-07 at 16:37 -0800, Paul Eggert wrote: > https://www.gnu.org/software/grep/manual/html_node/File-and-Directory-Selection.html > > and look for --binary-files. You can use 'grep -a' to pay more > attention > to binary data. Well I've had seen that, but why is 0x00 different from 0x

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

2021-11-08 Thread Christoph Anton Mitterer
On Sun, 2021-11-07 at 23:20 -0800, Paul Eggert wrote: > POSIX says text files cannot contain NUL bytes. They can contain 0x02 > bytes, though. Well yes, that' clear... but at least the console output in the 0x02 case seems to imply that grep already considers it binary (and not text file). So I th