GNU bug report logs -
#23269
new snapshot available: grep-2.24.13-bed6
Previous Next
Reported by: Jim Meyering <jim <at> meyering.net>
Date: Mon, 11 Apr 2016 15:54:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon, Apr 11, 2016 at 8:53 AM, Jim Meyering <jim <at> meyering.net> wrote:
> [In case you're wondering why the mbrtowc work-around matters,
> here's the story: I was dismayed to learn that even with the very
> latest Fedora, glibc and grep-2.23 or grep-2.24, this
>
> printf '\344' | LC_ALL=C grep .
>
> would print "Binary file (standard input) matches".
> We should never get that "Binary file matches" diagnostic
> when using the LC_ALL=C locale. Thanks to Björn JACKE
> for noticing and reporting that. See http://bugs.gnu.org/23234
> for full details. ]
To summarize, that problem was due to the way mbrtowc works
in the C/POSIX locale with certain C library runtime releases.
There, mbrtowc would report that bytes 128..255 were not valid
characters, thus evoking grep's "Binary file matches" diagnostic.
Paul's fix was to add configure-time tests to detect the problem
and (when detected) to enable a replacement mbrtowc function
that calls the underlying one, and corrects for any offending case.
This problem is likely to affect many more programs
than just grep, so we presume it will be fixed promptly, but
don't want to make grep's proper functioning depend on
an as-yet-unreleased C library.
This bug report was last modified 8 years and 310 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.