Re: grep treating my text files as binary!

2015-01-02 Thread Eric Blake
On 12/25/2014 11:41 AM, Thomas Wolff wrote: > I've read the POSIX definition of "binary file" that was quoted in the > grep bug already, > and if I remember correctly (or how this is abbreviated here...) it does > not mention character encoding or locale. Ah, but it does. http://pubs.opengroup.or

Re: grep treating my text files as binary!

2014-12-27 Thread Bengt Larsson
Achim Gratz wrote: >Am 27.12.2014 um 11:07 schrieb Bengt Larsson: >> I ran into this, actually. I keep a list of my directories and it is in >> CP1252 for reasons of interfacing with CMD.EXE. Suddenly grep couldn't >> match it. But I figured something was up and set my locale to CP1252 and >> then

Re: grep treating my text files as binary!

2014-12-27 Thread Achim Gratz
Am 27.12.2014 um 11:07 schrieb Bengt Larsson: I ran into this, actually. I keep a list of my directories and it is in CP1252 for reasons of interfacing with CMD.EXE. Suddenly grep couldn't match it. But I figured something was up and set my locale to CP1252 and then it worked. I just keep a "CH

Re: grep treating my text files as binary!

2014-12-27 Thread Bengt Larsson
Warren Young wrote: >On Dec 25, 2014, at 11:41 AM, Thomas Wolff wrote: > >> In any case the argument is quite artificial since the new behaviour >> hits many files that are in fact text files. > >Please define the term “text file” in a way that allows a C programmer >to write a program that automa

Re: grep treating my text files as binary!

2014-12-26 Thread Warren Young
On Dec 25, 2014, at 11:41 AM, Thomas Wolff wrote: > In any case the argument is quite artificial since the new behaviour > hits many files that are in fact text files. Please define the term “text file” in a way that allows a C programmer to write a program that automatically does the correct t

Re: grep treating my text files as binary!

2014-12-25 Thread Thomas Wolff
Am 25.12.2014 um 00:16 schrieb zzapper: Eric Blake wrote in news:549b4258.5050...@redhat.com: You upgraded grep. This is an intentional change in behavior in the newest grep. Work around it by using 'grep -a' or 'LC_ALL=C grep'. Eric had further written: Basically, the POSIX definition o

Re: grep treating my text files as binary!

2014-12-24 Thread zzapper
Eric Blake wrote in news:549b4258.5050...@redhat.com: > > You upgraded grep. This is an intentional change in behavior in the > newest grep. Work around it by using 'grep -a' or 'LC_ALL=C grep'. > Thanks Eric, just surprised not to see more people bleating about this - it resisted my Goog

Re: grep treating my text files as binary!

2014-12-24 Thread Eric Blake
On 12/24/2014 05:45 AM, zzapper wrote: > Binary file /c/intranet/note/note.html matches > > file note.html > note.html: HTML document, Non-ISO extended-ASCII text, with CRLF line > terminators > > > I know I can iconv them but why is this suddenly happening I'm unaware of > changing any of my

grep treating my text files as binary!

2014-12-24 Thread zzapper
Binary file /c/intranet/note/note.html matches file note.html note.html: HTML document, Non-ISO extended-ASCII text, with CRLF line terminators I know I can iconv them but why is this suddenly happening I'm unaware of changing any of my settings?? (behaves same with zsh & bash) -- zzapper