git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Greg Kroah-HartmanNext: Ævar Arnfjörð Bjarmason
Message 6 of 14 in “Git messes up 'ø' character”
  1. Noralf TrønnesJan 20, 2015
  2. Torsten BögershausenJan 20, 2015
  3. Noralf TrønnesJan 20, 2015
  4. Ævar Arnfjörð BjarmasonJan 20, 2015
  5. Greg Kroah-HartmanJan 20, 2015
  6. Jeff KingJan 20, 2015
  7. Ævar Arnfjörð BjarmasonJan 20, 2015
  8. Noralf TrønnesJan 20, 2015
  9. Ævar Arnfjörð BjarmasonJan 20, 2015
  10. Noralf TrønnesJan 20, 2015
  11. Ævar Arnfjörð BjarmasonJan 20, 2015
  12. Nico WilliamsJan 20, 2015
  13. Noralf TrønnesJan 20, 2015
  14. Michael J GruberJan 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.