Re: [PATCH] gettext: use libcharset when available
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Sep 29, 2010, 13:34 UTC
- Message-ID
- <AANLkTinRsryfdnj_uUH++yZrV1r_M+NNoXLm9TSO9N+J@mail.gmail.com>
- In-Reply-To
- <1285765637-16381-1-git-send-email-avarab@gmail.com>
On Wed, Sep 29, 2010 at 3:07 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 14 quoted lines
> From: Erik Faye-Lund <kusmabite@gmail.com> > > Change the git_setup_gettext function to use libcharset to query the > character set of the current locale if it's available. I.e. use it > instead of nl_langinfo if HAVE_LIBCHARSET_H is set. > > The GNU gettext manual recommends using langinfo.h's > nl_langinfo(CODESET) to acquire the current character set, but on > systems that have libcharset.h's locale_charset() using the latter is > either saner, or the only option on those systems. > > GNU and Solaris have a nl_langinfo(CODESET), FreeBSD can use either, > but MingW and some others need to use libcharset.h's locale_charset() > instead.
Very minor nit: It's officially spelled MinGW, with an upper-case G.
Show 11 quoted lines
> > Since locale_charset returns a const char* instead of char* as > nl_langinfo does the type of the variable we're using to store the > charset in git_setup_gettext has been changed. > > Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> > --- > > Junio, this goes on top of ab/i18n. >
Wow, thanks for taking care of this!