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

Re: Odd encoding issue with UTF-8 + gettext yields ? on non-ASCII

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 29, 2010, 20:45 UTC
Message-ID
<20100829204519.GB1890@burratino>
In-Reply-To
<AANLkTimn+-5Vys+jg=ryDfwdJ=WZfGwgZ+065M_=TF8r@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> So, my plan of attack is:
> 
>  * Add compat/printf from Free, Open or NetBSD. Maybe make
>    compat/snprintf.c use that while I'm at it.

I would prefer to get this fixed in glibc, but of course that has nothing to do with git.

Show 9 quoted lines
>  * Use that instead of the GNU libc printf on systems that have glibc.
>  * Add a configure check for that.
>  * Revert 107880a
>  * Get gettext goodness with LC_CTYPE
> 
> Does anyone see a problem with that? The potential issue is that
> LC_CTYPE is for:
> 
>     "regular expression matching,
should be okay, I think (unless http-backend is a problem)
> character classification,
worked around (see git-compat-util.h)
>     conversion,

I don't know what this means; iconv() is not affected by LC_CTYPE, is it?

> case-sensitive comparison,
Could be a problem: we use strcasecmp() heavily.
> and wide character
>     functions."
no problem. :)
> So it might have unintended side-effects. But the only other
> workaround I can see is to decree that all consumers of the localized
> messages must have a UTF-8 locale.

And that is no workaround at all; the problem is still seen with UTF-8 locales, no?

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 11 of 20 in “Odd encoding issue with UTF-8 + gettext yields ? on non-ASCII”
  1. Ævar Arnfjörð BjarmasonAug 28, 2010
  2. Ævar Arnfjörð BjarmasonAug 28, 2010
  3. Jonathan NiederAug 28, 2010
  4. Jonathan NiederAug 28, 2010
  5. Marcin CieslakAug 28, 2010
  6. Jonathan NiederAug 28, 2010
  7. Ævar Arnfjörð BjarmasonAug 29, 2010
  8. Ævar Arnfjörð BjarmasonAug 29, 2010
  9. Jonathan NiederAug 30, 2010
  10. Ævar Arnfjörð BjarmasonAug 29, 2010
  11. Jonathan NiederAug 29, 2010
  12. Ævar Arnfjörð BjarmasonAug 30, 2010
  13. Jonathan NiederAug 30, 2010
  14. Marcin CieslakAug 30, 2010
  15. Jonathan NiederAug 30, 2010
  16. Ævar Arnfjörð BjarmasonAug 30, 2010
  17. Ævar Arnfjörð BjarmasonAug 30, 2010
  18. Ævar Arnfjörð BjarmasonAug 30, 2010
  19. Jonathan NiederAug 28, 2010
  20. Marcin CieslakAug 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.