On Mon, Feb 29, 2016 at 3:35 PM, Paul Eggert <egg...@cs.ucla.edu> wrote: > On 02/29/2016 12:34 PM, Marcello Perathoner wrote: ... >> Since 2.21 I will now have to always specify -a or LC_ALL=C when >> grepping my files. > > I suggest using -a. LC_ALL=C won't work the way that you want on platforms > where the C locale is UTF-8, or is pure ASCII. For example, on Fedora 23 or > RHEL 7 with grep 2.23 we have: > > $ printf '\200\n' | LC_ALL=C grep . > Binary file (standard input) matches > > This is because the C locale is pure ASCII on these platforms, i.e., '\200' > is not a valid character the way it is with traditional Unix. I don't know > why Red Hat made that change.
Wow. I hadn't noticed that using LC_ALL=C is inadequate. Disturbing...