bug-grep
[Top][All Lists]
Advanced

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

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


From: Sebastian Poehn
Subject: bug#20526: BUG: text file is detected as binary
Date: Fri, 08 May 2015 09:40:46 +0200

On Thu, 2015-05-07 at 13:07 -0700, Paul Eggert wrote:
> On 05/07/2015 10: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.
> >
> 
> Not really, as Openwrt is relying on undefined behavior.  The spec for 
> grep has never defined what grep does when you feed it binary data that 
> is not properly encoded for the current locale.  Different versions of 
> grep (and we're not just talking GNU grep here, but other 
> implementations) do different things.  Some grep implementations dump 
> core.  These behaviors all conform to the spec.  (Well, GNU grep isn't 
> supposed to dump core, but older versions of GNU grep are buggy and will 
> dump core sometimes anyway, so you'll need good luck with them.)

Ok, agree. It's not a regression. It's just that we got a little
stricter.
> 
> > 2) I will also open a report at fedora, maybe the use some strange 
> > setting in building the new packet.
> >
> 
> Nowadays most people are using UTF-8, so I suggest encoding the 
> Makefiles in UTF-8 and specifying a UTF-8 locale when you build. Another 
> possibility is the attached hack (I haven't tried it).  The most 
> conservative course would be to insist that Makefiles be ASCII, although 
> ....
There is already a report for this. Let's see what they do.
> 
> > 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 ;)
> >
> 
> Don't blame you a bit.

I checked openwrt upstream. They changed all Makefiles not being ASCII
to UTF-8 three months ago as they run into exactly this.







reply via email to

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