Subject: Re: bug#19230: Help! grepV2.21 treats ISO-8859 text files as if they are binary

From: Paul Eggert <[email-masked]>
Date: Sun, 30 Nov 2014 14:02:13 -0800

Hans Pelleboer wrote:

> Binary file <NAME_FILE> matches
>
> Further tests showed, that grep only behaved this way with text
> files that were encoded according to ISO-8859 (There may be more!).

What operating system are you running on, and how did you build or import grep?

Also, what's your locale?  What is the output of the shell command 'locale'?

I can see this happening if you are using an UTF-8 locale, as in general 
ISO-8859 is not valid UTF-8 text.  Older versions of 'grep' were less picky in 
this area, and that might explain the symptoms you observed.  With newer 
versions it's more important for the locale to be compatible with the text 
file's encoding.