From: Jonathan Nieder Date: Sat, 28 Aug 2010 21:46:41 GMT Subject: Re: Odd encoding issue with UTF-8 + gettext yields ? on non-ASCII Message-ID: <20100828214641.GA5515@burratino> In-Reply-To: Ævar Arnfjörð Bjarmason wrote: > 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.