bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17221: [PATCH] grep: port better to hosts with nonstandard nl_langin


From: Jim Meyering
Subject: bug#17221: [PATCH] grep: port better to hosts with nonstandard nl_langinfo
Date: Tue, 8 Apr 2014 10:41:51 -0700

On Tue, Apr 8, 2014 at 8:04 AM, Paul Eggert <address@hidden> wrote:
> On some hosts, nl_langinfo returns strings other than "UTF-8" when
> UTF-8 is used, and (worse) return "UTF-8" even if the encoding is
> single-byte.  Work around these problems by trying a sample
> character instead.
> * src/dfa.c, src/pcresearch.c, src/searchutils.c:
> Don't include <langinfo.h>.
> * src/dfa.c (using_utf8): Test for UTF-8 by trying a character
> rather than by invoking nl_langinfo (CODESET); this is more
> portable in practice, and removes a dependency on
> HAVE_LANGINFO_CODESET.
> * src/pcresearch.c: Include dfa.h, for using_utf8.
> (Pcompile): Use using_utf8 rather than nl_langinfo.

Nicely done.  And thanks for handling so many of Norihiro's patches.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]