Subject: bug#23269: new snapshot available: grep-2.24.13-bed6

From: Jim Meyering <[email-masked]>
Date: Mon, 11 Apr 2016 09:13:08 -0700

On Mon, Apr 11, 2016 at 8:53 AM, Jim Meyering <[email-masked]> 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.