git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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!
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 9 of 12 in “gettext: use libcharset when available”
  1. gettext: use libcharset when availableErik Faye-Lund, Sep 28, 2010
  2. Ævar Arnfjörð BjarmasonSep 28, 2010
  3. Erik Faye-LundSep 28, 2010
  4. 0/2 use libcharset.h with gettext if availableÆvar Arnfjörð Bjarmason, Sep 28, 2010
  5. Erik Faye-LundSep 28, 2010
  6. Ævar Arnfjörð BjarmasonSep 29, 2010
  7. Erik Faye-LundSep 29, 2010
  8. gettext: use libcharset when availableÆvar Arnfjörð Bjarmason, Sep 29, 2010
  9. Erik Faye-LundSep 29, 2010
  10. gettext: use libcharset when availableÆvar Arnfjörð Bjarmason, Sep 29, 2010
  11. gettext: use libcharset when availableÆvar Arnfjörð Bjarmason, Sep 29, 2010
  12. 1/2 gettext: use const char* instead of char*Ævar Arnfjörð Bjarmason, Sep 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.