From: Jiang Xin Date: Fri, 02 Mar 2012 12:18:36 GMT Subject: Re: [PATCH] Update l10n guide Message-ID: In-Reply-To: <4F50A55E.8040705@viscovery.net> 2012/3/2 Johannes Sixt : > It does not convert, but it records which encoding the text has. If you > don't specify anything, UTF-8 is assumed, and if your text is actually not > UTF-8, the result is necessarily garbage. > > Then you haven't set i18n.commitEncoding. Try this: > >   git config i18n.commitEncoding CP936 I know there are two config variables. i18n.commitEncoding will insert a "encoding XX" line to the commit object, while i18n.logOutputEncoding will set the default output encoding. But this implementation seems like a workaround. * Tree objects do not have such implementation, so multibyte characters can not be used as filenames. * Commit object without "encoding" instruction will be used as it is. So people under the same non-utf8 locale may not notice that they have not set the proper i18n.commitEncoding, until one day they need accross platform development. * As raw commit log alway used as fallback, sometimes it is hard to find commit objects with wrong encoding instructions. I think save commit object, tree object, packed-refs in UTF-8 is a better implementation. -- Jiang Xin