bug-grep
[Top][All Lists]
Advanced

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

bug#21558: checking for a binary file is not deterministic


From: Benno Schulenberg
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.






reply via email to

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