Subject: Re: Git messes up 'ø' character

From: Jeff King <[email-masked]>
Date: Tue, 20 Jan 2015 16:20:49 -0500

On Tue, Jan 20, 2015 at 09:45:46PM +0100, Ævar Arnfjörð Bjarmason wrote:

> 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.