bug-grep
[Top][All Lists]
Advanced

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

bug#22838: New 'Binary file' detection considered harmful


From: Jim Meyering
Subject: bug#22838: New 'Binary file' detection considered harmful
Date: Thu, 8 Sep 2016 22:20:36 -0700

On Thu, Sep 8, 2016 at 6:43 PM, Paul Eggert <address@hidden> wrote:
> Paul Eggert wrote:
>>
>> On 03/01/2016 02:05 AM, Marcello Perathoner wrote:
>>>
>>> 2) If you just output
>>>
>>>    binary line 42 in file x matches
>>>
>>> and continue regular output after the next newline, the breakage would be
>>> much
>>> more confined.
>>
>>
>> This sounds like a good suggestion.  That is, grep could keep going if its
>> only
>> problem is an attempt to output encoding errors (as opposed to reading
>> null
>> bytes, which are a more-reliable indication of binary data).  It would
>> probably
>> be better to output just one "Binary file matches" line per file, at the
>> end of
>> the other matches, so that it's more likely to be noticed.
>
>
> I finally got around to implementing this, which turned out to be
> considerably easier than I thought it would be. I installed the attached
> patch into the grep Savannah master. I am boldly closing this old bug
> report; we can always start a new report if further problems turn up.

Very nice.  Thank you!





reply via email to

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