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
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 30, 2010, 14:04 UTC
Message-ID
<AANLkTi=otZ-mxoaPJ3Mg9EFb5+jy1A=DS3w73weB5EJ=@mail.gmail.com>
In-Reply-To
<20100830134136.GA2315@burratino>
On Mon, Aug 30, 2010 at 13:41, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 8 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>
>> We can even keep the "Content-Type: text/plain; charset=UTF-8\n" and
>> *not* use LC_CTYPE if we add a bind_textdomain_codeset("git", "UTF-8")
>> call to gettext.
>
> Oh!  I'd personally prefer to do that for now. :)  (Not because of the
> known printf problem but because I like to reduce possible unknowns.)

By now I want to do that too. I've been experimenting with including *printf*.c from OpenBSD, NetBSD or FreeBSD and the uClibc and in all those cases it's a major PITA to wade through the OS-specific code that deep in the libc.

Even if I could get that sorted it'll be non-trivial to audit all the code whose semantics will change with LC_CTYPE, and there's a good chance I'll miss something and cause an embarrasing bug in some unrelated component.

Better to just document this limitation for now and decree that gettext users must have a UTF-8 locale.

Previous: Ævar Arnfjörð BjarmasonNext: Jonathan Nieder
Message 18 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.