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 28, 2010, 21:46 UTC
Message-ID
<20100828214641.GA5515@burratino>
In-Reply-To
<AANLkTikHbxrmj3R1LDghVvMA1KNEdfeiXj44cq1KRN7M@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 9 quoted lines
> Well, this is fun. It turns out that reverting 107880a makes it work,
> i.e. you need to set LC_CTYPE since reading *.mo files in a
> locale-awere manner involved character classification.
> 
> But as 107880a explains doing so broke other parts of Git.
> 
> I'll have to think about how to solve that, one way obviously would be
> to fix up our vsnprintf() invocation, but there may be others like it
> that I haven't spotted.

In case you remember: why did vsnprintf() fail in that example? If I understand what C99 says correctly (a big if), then

 printf("%s\n", some_nonsense_string);
should always just work.
ltrace indicates that something is wacky about the format string.
 vsnprintf("Author: ", 143, "%s: %.*s%.*s\n", 0xbf8b5738) = -1

The regexes in http-backend are lc_collate- (but probably not lc_ctype-) sensitive. I am not sure how to go about exhaustively tracking down ctype-dependencies.

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