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

2015-09-25 Thread Paul Eggert
On 09/25/2015 11:54 AM, Benno Schulenberg wrote: 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

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

2015-09-25 Thread Benno Schulenberg
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 b

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

2015-09-25 Thread Paul Eggert
Thanks for the bug report. This appears to be basically the same as Bug#20526. An idea to fix it in a deterministic way was proposed here: http://bugs.gnu.org/20526#35 and this seems to have been received positively, but nobody has had the time to implement it yet. In the meantime I'll merg

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

2015-09-25 Thread Benno Schulenberg
Hi, When piping a certain diff into grep-2.21, it sometimes thinks it is a binary file, and sometimes treats it as text. The latter behaviour is expected and desired. I think grep should never consider standard input to be binary. For lack of a simple recipe, here is the actual use case: wg