GNU bug report logs - #21558
checking for a binary file is not deterministic

Previous Next

Package: grep;

Reported by: Benno Schulenberg <bensberg <at> justemail.net>

Date: Fri, 25 Sep 2015 09:12:01 UTC

Severity: normal

Merged with 19230, 19985, 20526

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Benno Schulenberg <bensberg <at> justemail.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 21558 <at> debbugs.gnu.org
Subject: bug#21558: checking for a binary file is not deterministic
Date: Fri, 25 Sep 2015 20:54:16 +0200
On Fri, Sep 25, 2015, at 20:02, Paul Eggert wrote:
> Thanks for the bug report.  This appears to be basically the same as 
> Bug#20526.

Well, not quite.  That grep will see misencoded files as binary data,
I understand.  But what perplexed me is that grep would *sometimes*
see the piped data as binary, and sometimes not.  How is this possible?

When I pipe the data to a file and then grep the file, it is *always*
seen as binary.  Why then not the input stream?  Do you understand
how it can differ from one run to the other?

>  An idea to fix it in a deterministic way was proposed here:
> 
> http://bugs.gnu.org/20526#35

If I understand it correctly, it would mean that in my example the
piped data would never be classified as binary because the first
grep will never output any of the misencoded bytes.  Right?
If so, then that would be a pretty good change.

Benno

-- 
http://www.fastmail.com - A fast, anti-spam email service.





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

Previous Next


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