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) = -1The 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.