Re: Git messes up 'ø' character
- From
Jeff King <peff@peff.net>
- Date
- Jan 20, 2015, 21:20 UTC
- Message-ID
- <20150120212049.GA22103@peff.net>
- In-Reply-To
- <CACBZZX58Di=m2YEKRuAsuU=bqUXjQhN21tvjRL8Z1Vbuyk2fKQ@mail.gmail.com>
On Tue, Jan 20, 2015 at 09:45:46PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 5 quoted lines
> What's happened here is that: > > 1. You've authored your commit in ISO-8859-1 > 2. Git itself has no place for the encoding of the author name in the > commit object format
Is (2) right? The "encoding" header in a commit object should apply not just to the commit message, but also to the author (and committer) name.
I think the real problem is simply that it defaults to UTF-8, but he is giving it iso-8859-1 characters. Setting i18n.commitEncoding should fix it.
-Peff
PS If you try experimenting with this, you may fall afoul of 08a94a1 (commit/commit-tree: correct latin1 to utf-8, 2012-06-28), which will silently "correct" Latin1 characters into UTF-8 (when the commit message is expected to be in UTF-8, of course). So it actually _should_ just work under modern gits, but only for Latin1.