From: Erik Faye-Lund Date: Wed, 29 Sep 2010 13:34:54 GMT Subject: Re: [PATCH] gettext: use libcharset when available Message-ID: 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 wrote: > From: Erik Faye-Lund > > 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. > > 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 > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > > Junio, this goes on top of ab/i18n. > Wow, thanks for taking care of this!