bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24347: Bug when grepping a text file with some arbitrary binary data


From: Paul Eggert
Subject: bug#24347: Bug when grepping a text file with some arbitrary binary data
Date: Mon, 12 Sep 2016 23:40:28 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

>> The latter has been longstanding behavior for quite some time.

I surmise it has not hit many distros yet.

The behavior with NULs was introduced in grep 2.3 (1999) so I think it has hit most distros by now....

Before 1999, grep was pickier about binary files than it is now; for example, ESC ('\033') was considered binary. No matter what heuristic we use for detecting binary files, the heuristic will break for some people and they will file bug reports. We have to use our best judgment, is all. In practice for today's files, NUL bytes are a pretty good sign that a file is binary.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]