GNU bug report logs - #23234
unexpected results with charset handling in GNU grep 2.23

Previous Next

Package: grep;

Reported by: Björn JACKE <bjoern <at> j3e.de>

Date: Wed, 6 Apr 2016 20:45:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 23234 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: Bjoern Jacke <bjoern <at> j3e.de>, Eric Blake <eblake <at> redhat.com>,
 23234 <at> debbugs.gnu.org
Subject: Re: bug#23234: unexpected results with charset handling in GNU grep
 2.23
Date: Sat, 9 Apr 2016 20:07:18 -0700
Norihiro Tanaka wrote:
> Hmm, diff does not output "Binary file matches" between text files, but
> grep does it.

I wasn't referring to the exact string "Binary file matches", merely to the idea 
that diff outputs a message to stdout saying that there was a binary file, 
rather than to stderr. Something like this:

$ diff /usr/bin/diff /usr/bin/emacs 2>/dev/null
Binary files /usr/bin/diff and /usr/bin/emacs differ

> When a user got "Binary file matches" from grep, he can distinguish
> whether matched a binary file or a line including "Binary file matches"
> of a text file from only this result.

Although that's a problem, it's not a serious one, as one can easily work around 
it by using -n or -H. If there were need, I suppose we could add another operand 
to the --binary option to cause it to do something else with a match.




This bug report was last modified 9 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.