Subject: Re: bug#20526: BUG: text file is detected as binary

From: Eric Blake <[email-masked]>
Date: Thu, 07 May 2015 13:11:49 -0600

On 05/07/2015 11:47 AM, Sebastian Pöhn wrote:
> Thanks for this fast feedback. Your explanation sounds very reasonable. As
> you may have noticed this a makefile out of openwrt with is mainlined there.
> 
> 1) I downgraded to grep 2.20. Issue is gone with the same environment. So
> this is in my eyes a regression.

No, it is a bug fix, and documented in the NEWS:

  If a file contains data improperly encoded for the current locale,
  and this is discovered before any of the file's contents are output,
  grep now treats the file as binary.

> 
> 2) I will also open a report at fedora, maybe the use some strange setting
> in building the new packet.

But as the change is intentional, there is probably nothing that Fedora
would do about it.

> 
> 3) I will send a short notice to openwrt asking if they think it is fine to
> use ë or ö. I personally have a strong opinion on that ;)

It would be fine if they would recode their file to use UTF-8, as that
is pretty much a standard encoding these days.  Latin-1 files are
getting harder and harder to process, as more people move to multibyte
UTF-8 locales.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org