{"thread":{"id":"38413","subject":"Git messes up 'ø' character","startedAt":"2015-01-20T19:46:21Z","lastAt":"2015-01-22T09:59:02Z","messageCount":14,"participants":["Noralf Trønnes","Torsten Bögershausen","Ævar Arnfjörð Bjarmason","Greg Kroah-Hartman","Jeff King","Nico Williams","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"254948","messageId":"54BEB08D.9090905@tronnes.org","threadId":"38413","inReplyTo":null,"subject":"Git messes up 'ø' character","fromName":"Noralf Trønnes","fromEmail":"notro@tronnes.org","sentAt":"2015-01-20T19:46:21Z","receivedAt":"2015-01-20T19:46:21Z","isPatch":false,"sender":{"key":"notro@tronnes.org","avatar":null},"body":"I can't get my name: Noralf Trønnes, to come out correctly when I\nformat and send a patch. The 'ø' becomes a question mark when received\nin my email client.\n\nThis is the head of the patch file generated by git format-patch:\n\n From b2a4f6abdb097c4dc092b56995a2af8e42fbea79 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Noralf=20Tr=F8nnes?= <notro@tronnes.org>\nDate: Tue, 20 Jan 2015 18:34:47 +0100\nSubject: [PATCH] staging: fbtft: remove ARCH_BCM2708 optimization\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nARCH_BCM2708 is not present in mainline so remove optimization.\n\nSigned-off-by: Noralf Trønnes <notro@tronnes.org>\n---\n\n$ git log -1\ncommit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\nAuthor: Noralf Tr<F8>nnes <notro@tronnes.org>\nDate:   Tue Jan 20 18:34:47 2015 +0100\n\n     staging: fbtft: remove ARCH_BCM2708 optimization\n\n     ARCH_BCM2708 is not present in mainline so remove optimization.\n\n     Signed-off-by: Noralf Tr<F8>nnes <notro@tronnes.org>\n\n$ git send-email --to notro@tronnes.org \n0001-staging-fbtft-remove-ARCH_BCM2708-optimization.patch\n0001-staging-fbtft-remove-ARCH_BCM2708-optimization.patch\n(mbox) Adding cc: =?UTF-8?q?Noralf=20Tr=F8nnes?= <notro@tronnes.org> \nfrom line 'From: =?UTF-8?q?Noralf=20Tr=F8nnes?= <notro@tronnes.org>'\n(body) Adding cc: Noralf Trønnes <notro@tronnes.org> from line \n'Signed-off-by: Noralf Trønnes <notro@tronnes.org>'\n\nFrom: =?UTF-8?q?Noralf=20Tr=F8nnes?= <notro@tronnes.org>\nTo: notro@tronnes.org\nSubject: [PATCH] staging: fbtft: remove ARCH_BCM2708 optimization\nDate: Tue, 20 Jan 2015 20:25:24 +0100\nMessage-Id: <1421781924-3066-1-git-send-email-notro@tronnes.org>\nX-Mailer: git-send-email 2.2.2\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\n     The Cc list above has been expanded by additional\n     addresses found in the patch commit message. By default\n     send-email prompts before sending whenever this occurs.\n     This behavior is controlled by the sendemail.confirm\n     configuration setting.\n\n     For additional information, run 'git send-email --help'.\n     To retain the current behavior, but squelch this message,\n     run 'git config --global sendemail.confirm auto'.\n\nSend this email? ([y]es|[n]o|[q]uit|[a]ll): y\nOK. Log says:\nServer: smtp.ebnett.no\nMAIL FROM:<notro@tronnes.org>\nRCPT TO:<notro@tronnes.org>\nFrom: =?UTF-8?q?Noralf=20Tr=F8nnes?= <notro@tronnes.org>\nTo: notro@tronnes.org\nSubject: [PATCH] staging: fbtft: remove ARCH_BCM2708 optimization\nDate: Tue, 20 Jan 2015 20:44:15 +0100\nMessage-Id: <1421783055-3117-1-git-send-email-notro@tronnes.org>\nX-Mailer: git-send-email 2.2.2\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nResult: 250 2.0.0 Ok: queued as B49BB8014D\n\n\n\nSetup:\n\nUbuntu server\n$ cat /etc/issue\nUbuntu 12.04.3 LTS \\n \\l\n\n$ git --version\ngit version 2.2.2\n\n$ git config -l\nuser.name=Noralf Trønnes\nuser.email=notro@tronnes.org\ncore.editor=nano\nalias.serve=daemon --verbose --export-all --base-path=/home/pi --reuseaddr\nsendemail.smtpserver=smtp.ebnett.no\ncore.repositoryformatversion=0\ncore.filemode=true\ncore.bare=false\ncore.logallrefupdates=true\nremote.origin.fetch=+refs/heads/*:refs/remotes/origin/*\nremote.origin.url=git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git\nbranch.master.remote=origin\nbranch.master.merge=refs/heads/master\nbranch.staging-testing.remote=origin\nbranch.staging-testing.merge=refs/heads/staging-testing\n\n\nRegards,\nNoralf Trønnes\n"},{"id":"254949","messageId":"54BEB585.2030902@web.de","threadId":"38413","inReplyTo":"54BEB08D.9090905@tronnes.org","subject":"Re: Git messes up 'ø' character","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-01-20T20:07:33Z","receivedAt":"2015-01-20T20:07:33Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2015-01-20 20.46, Noralf Trønnes wrote:\ncould it be that your \"ø\" is not encoded as UTF-8,\nbut in ISO-8859-15 (or so)\n\n> $ git log -1\n> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\nWhat does \ngit config -l | grep Noralf | xxd\nsay ?\n"},{"id":"254950","messageId":"54BEB7ED.2050103@tronnes.org","threadId":"38413","inReplyTo":"54BEB585.2030902@web.de","subject":"Re: Git messes up 'ø' character","fromName":"Noralf Trønnes","fromEmail":"notro@tronnes.org","sentAt":"2015-01-20T20:17:49Z","receivedAt":"2015-01-20T20:17:49Z","isPatch":false,"sender":{"key":"notro@tronnes.org","avatar":null},"body":"Den 20.01.2015 21:07, skrev Torsten Bögershausen:\n> On 2015-01-20 20.46, Noralf Trønnes wrote:\n> could it be that your \"ø\" is not encoded as UTF-8,\n> but in ISO-8859-15 (or so)\n>\n>> $ git log -1\n>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\n> What does\n> git config -l | grep Noralf | xxd\n> say ?\n>\n$ git config -l | grep Noralf | xxd\n0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n\n$ file ~/.gitconfig\n/home/pi/.gitconfig: ISO-8859 text\n"},{"id":"254951","messageId":"CACBZZX58Di=m2YEKRuAsuU=bqUXjQhN21tvjRL8Z1Vbuyk2fKQ@mail.gmail.com","threadId":"38413","inReplyTo":"54BEB7ED.2050103@tronnes.org","subject":"Re: Git messes up 'ø' character","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2015-01-20T20:45:46Z","receivedAt":"2015-01-20T20:45:46Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jan 20, 2015 at 9:17 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n> Den 20.01.2015 21:07, skrev Torsten Bögershausen:\n>>\n>> On 2015-01-20 20.46, Noralf Trønnes wrote:\n>> could it be that your \"ø\" is not encoded as UTF-8,\n>> but in ISO-8859-15 (or so)\n>>\n>>> $ git log -1\n>>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n>>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\n>>\n>> What does\n>> git config -l | grep Noralf | xxd\n>> say ?\n>>\n> $ git config -l | grep Noralf | xxd\n> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n>\n> $ file ~/.gitconfig\n> /home/pi/.gitconfig: ISO-8859 text\n\nWhat's happened here is that:\n\n 1. You've authored your commit in ISO-8859-1\n 2. Git itself has no place for the encoding of the author name in the\ncommit object format\n 3. git-format-patch has a --compose-encoding which I think would sort\nthis out if you set it to ISO-8859-1, but it defaults to UTF-8\n 4. Your patch is actually a ISO-8859-1 byte sequence, but is\nadvertised as UTF-8\n 5. You end up with a screwed-up commit\n\nYou could work around this, but I suggest just joining the 21st\ncentury and working exclusively in UTF-8, it makes things much easier,\nspeaking as someone with 3x more non-ASCII characters their his name\nthan you :)\n"},{"id":"254952","messageId":"20150120210543.GA13382@kroah.com","threadId":"38413","inReplyTo":"CACBZZX58Di=m2YEKRuAsuU=bqUXjQhN21tvjRL8Z1Vbuyk2fKQ@mail.gmail.com","subject":"Re: Git messes up 'ø' character","fromName":"Greg Kroah-Hartman","fromEmail":"gregkh@linuxfoundation.org","sentAt":"2015-01-20T21:05:43Z","receivedAt":"2015-01-20T21:05:43Z","isPatch":false,"sender":{"key":"gregkh@linuxfoundation.org","avatar":"https://gravatar.com/avatar/e6d9136f6e3bdcb59f0e5fd15565f382da42523d273824958b9e23e73cf38e04?d=mp&s=160"},"body":"On Tue, Jan 20, 2015 at 09:45:46PM +0100, Ævar Arnfjörð Bjarmason wrote:\n> On Tue, Jan 20, 2015 at 9:17 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n> > Den 20.01.2015 21:07, skrev Torsten Bögershausen:\n> >>\n> >> On 2015-01-20 20.46, Noralf Trønnes wrote:\n> >> could it be that your \"ø\" is not encoded as UTF-8,\n> >> but in ISO-8859-15 (or so)\n> >>\n> >>> $ git log -1\n> >>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n> >>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\n> >>\n> >> What does\n> >> git config -l | grep Noralf | xxd\n> >> say ?\n> >>\n> > $ git config -l | grep Noralf | xxd\n> > 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n> > 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n> >\n> > $ file ~/.gitconfig\n> > /home/pi/.gitconfig: ISO-8859 text\n> \n> What's happened here is that:\n> \n>  1. You've authored your commit in ISO-8859-1\n>  2. Git itself has no place for the encoding of the author name in the\n> commit object format\n>  3. git-format-patch has a --compose-encoding which I think would sort\n> this out if you set it to ISO-8859-1, but it defaults to UTF-8\n>  4. Your patch is actually a ISO-8859-1 byte sequence, but is\n> advertised as UTF-8\n>  5. You end up with a screwed-up commit\n> \n> You could work around this, but I suggest just joining the 21st\n> century and working exclusively in UTF-8, it makes things much easier,\n> speaking as someone with 3x more non-ASCII characters their his name\n> than you :)\n\nSo how exactly do you fix this using UTF-8?  Git is exporting a UTF-8\n\"From:\" line so it thinks the character is correct, but it's not\ncreating something properly here.\n\nconfused,\n\ngreg k-h\n"},{"id":"254953","messageId":"20150120212049.GA22103@peff.net","threadId":"38413","inReplyTo":"CACBZZX58Di=m2YEKRuAsuU=bqUXjQhN21tvjRL8Z1Vbuyk2fKQ@mail.gmail.com","subject":"Re: Git messes up 'ø' character","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-20T21:20:49Z","receivedAt":"2015-01-20T21:20:49Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jan 20, 2015 at 09:45:46PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n> What's happened here is that:\n> \n>  1. You've authored your commit in ISO-8859-1\n>  2. Git itself has no place for the encoding of the author name in the\n> commit object format\n\nIs (2) right? The \"encoding\" header in a commit object should apply not\njust to the commit message, but also to the author (and committer) name.\n\nI think the real problem is simply that it defaults to UTF-8, but he is\ngiving it iso-8859-1 characters. Setting i18n.commitEncoding should fix\nit.\n\n-Peff\n\nPS If you try experimenting with this, you may fall afoul of 08a94a1\n   (commit/commit-tree: correct latin1 to utf-8, 2012-06-28), which will\n   silently \"correct\" Latin1 characters into UTF-8 (when the commit\n   message is expected to be in UTF-8, of course). So it actually\n   _should_ just work under modern gits, but only for Latin1.\n"},{"id":"254955","messageId":"54BEC75C.3090207@tronnes.org","threadId":"38413","inReplyTo":"CACBZZX58Di=m2YEKRuAsuU=bqUXjQhN21tvjRL8Z1Vbuyk2fKQ@mail.gmail.com","subject":"Re: Git messes up 'ø' character","fromName":"Noralf Trønnes","fromEmail":"notro@tronnes.org","sentAt":"2015-01-20T21:23:40Z","receivedAt":"2015-01-20T21:23:40Z","isPatch":false,"sender":{"key":"notro@tronnes.org","avatar":null},"body":"Den 20.01.2015 21:45, skrev Ævar Arnfjörð Bjarmason:\n> On Tue, Jan 20, 2015 at 9:17 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n>> Den 20.01.2015 21:07, skrev Torsten Bögershausen:\n>>> On 2015-01-20 20.46, Noralf Trønnes wrote:\n>>> could it be that your \"ø\" is not encoded as UTF-8,\n>>> but in ISO-8859-15 (or so)\n>>>\n>>>> $ git log -1\n>>>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n>>>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\n>>> What does\n>>> git config -l | grep Noralf | xxd\n>>> say ?\n>>>\n>> $ git config -l | grep Noralf | xxd\n>> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n>> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n>>\n>> $ file ~/.gitconfig\n>> /home/pi/.gitconfig: ISO-8859 text\n> What's happened here is that:\n>\n>   1. You've authored your commit in ISO-8859-1\n>   2. Git itself has no place for the encoding of the author name in the\n> commit object format\n>   3. git-format-patch has a --compose-encoding which I think would sort\n> this out if you set it to ISO-8859-1, but it defaults to UTF-8\n>   4. Your patch is actually a ISO-8859-1 byte sequence, but is\n> advertised as UTF-8\n>   5. You end up with a screwed-up commit\n>\n> You could work around this, but I suggest just joining the 21st\n> century and working exclusively in UTF-8, it makes things much easier,\n> speaking as someone with 3x more non-ASCII characters their his name\n> than you :)\n>\n\nOk, then the question is: How do I switch to UTF-8?\n\nTo me it seems I'm already using it:\n$ locale charmap\nUTF-8\n"},{"id":"254956","messageId":"CACBZZX5f0ciqmJizYxe+UvKL-g9iDZTca52=9xZP4_qiuEaO3Q@mail.gmail.com","threadId":"38413","inReplyTo":"54BEC75C.3090207@tronnes.org","subject":"Re: Git messes up 'ø' character","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2015-01-20T21:26:29Z","receivedAt":"2015-01-20T21:26:29Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jan 20, 2015 at 10:23 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n> Den 20.01.2015 21:45, skrev Ævar Arnfjörð Bjarmason:\n>\n>> On Tue, Jan 20, 2015 at 9:17 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n>>>\n>>> Den 20.01.2015 21:07, skrev Torsten Bögershausen:\n>>>>\n>>>> On 2015-01-20 20.46, Noralf Trønnes wrote:\n>>>> could it be that your \"ø\" is not encoded as UTF-8,\n>>>> but in ISO-8859-15 (or so)\n>>>>\n>>>>> $ git log -1\n>>>>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n>>>>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\n>>>>\n>>>> What does\n>>>> git config -l | grep Noralf | xxd\n>>>> say ?\n>>>>\n>>> $ git config -l | grep Noralf | xxd\n>>> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n>>> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n>>>\n>>> $ file ~/.gitconfig\n>>> /home/pi/.gitconfig: ISO-8859 text\n>>\n>> What's happened here is that:\n>>\n>>   1. You've authored your commit in ISO-8859-1\n>>   2. Git itself has no place for the encoding of the author name in the\n>> commit object format\n>>   3. git-format-patch has a --compose-encoding which I think would sort\n>> this out if you set it to ISO-8859-1, but it defaults to UTF-8\n>>   4. Your patch is actually a ISO-8859-1 byte sequence, but is\n>> advertised as UTF-8\n>>   5. You end up with a screwed-up commit\n>>\n>> You could work around this, but I suggest just joining the 21st\n>> century and working exclusively in UTF-8, it makes things much easier,\n>> speaking as someone with 3x more non-ASCII characters their his name\n>> than you :)\n>>\n>\n> Ok, then the question is: How do I switch to UTF-8?\n>\n> To me it seems I'm already using it:\n> $ locale charmap\n> UTF-8\n\nYour .gitconfig has an ISO-8859-1 string, from an earlier mail of yours:\n\n> $ git config -l | grep Noralf | xxd\n> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n\nOn a system configured for UTF-8 this would be:\n\n$ echo Noralf Trønnes | xxd\n0000000: 4e6f 7261 6c66 2054 72c3 b86e 6e65 730a  Noralf Tr..nnes.\n\nNote the \"f8\" v.s. \"c3 b8\".\n"},{"id":"254957","messageId":"CACBZZX68b-+UsYpen+-GmNiPzNAwJAZRgxNVPo_vU9m_sPrkBg@mail.gmail.com","threadId":"38413","inReplyTo":"20150120212049.GA22103@peff.net","subject":"Re: Git messes up 'ø' character","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2015-01-20T21:27:05Z","receivedAt":"2015-01-20T21:27:05Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jan 20, 2015 at 10:20 PM, Jeff King <peff@peff.net> wrote:\n> On Tue, Jan 20, 2015 at 09:45:46PM +0100, Ævar Arnfjörð Bjarmason wrote:\n>\n>> What's happened here is that:\n>>\n>>  1. You've authored your commit in ISO-8859-1\n>>  2. Git itself has no place for the encoding of the author name in the\n>> commit object format\n>\n> Is (2) right? The \"encoding\" header in a commit object should apply not\n> just to the commit message, but also to the author (and committer) name.\n>\n> I think the real problem is simply that it defaults to UTF-8, but he is\n> giving it iso-8859-1 characters. Setting i18n.commitEncoding should fix\n> it.\n\nTrue, I forgot about that setting.\n\n> -Peff\n>\n> PS If you try experimenting with this, you may fall afoul of 08a94a1\n>    (commit/commit-tree: correct latin1 to utf-8, 2012-06-28), which will\n>    silently \"correct\" Latin1 characters into UTF-8 (when the commit\n>    message is expected to be in UTF-8, of course). So it actually\n>    _should_ just work under modern gits, but only for Latin1.\n"},{"id":"254958","messageId":"54BECAE0.70309@tronnes.org","threadId":"38413","inReplyTo":"CACBZZX5f0ciqmJizYxe+UvKL-g9iDZTca52=9xZP4_qiuEaO3Q@mail.gmail.com","subject":"Re: Git messes up 'ø' character","fromName":"Noralf Trønnes","fromEmail":"notro@tronnes.org","sentAt":"2015-01-20T21:38:40Z","receivedAt":"2015-01-20T21:38:40Z","isPatch":false,"sender":{"key":"notro@tronnes.org","avatar":null},"body":"Den 20.01.2015 22:26, skrev Ævar Arnfjörð Bjarmason:\n> On Tue, Jan 20, 2015 at 10:23 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n>> Den 20.01.2015 21:45, skrev Ævar Arnfjörð Bjarmason:\n>>\n>>> On Tue, Jan 20, 2015 at 9:17 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n>>>> Den 20.01.2015 21:07, skrev Torsten Bögershausen:\n>>>>> On 2015-01-20 20.46, Noralf Trønnes wrote:\n>>>>> could it be that your \"ø\" is not encoded as UTF-8,\n>>>>> but in ISO-8859-15 (or so)\n>>>>>\n>>>>>> $ git log -1\n>>>>>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n>>>>>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\n>>>>> What does\n>>>>> git config -l | grep Noralf | xxd\n>>>>> say ?\n>>>>>\n>>>> $ git config -l | grep Noralf | xxd\n>>>> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n>>>> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n>>>>\n>>>> $ file ~/.gitconfig\n>>>> /home/pi/.gitconfig: ISO-8859 text\n>>> What's happened here is that:\n>>>\n>>>    1. You've authored your commit in ISO-8859-1\n>>>    2. Git itself has no place for the encoding of the author name in the\n>>> commit object format\n>>>    3. git-format-patch has a --compose-encoding which I think would sort\n>>> this out if you set it to ISO-8859-1, but it defaults to UTF-8\n>>>    4. Your patch is actually a ISO-8859-1 byte sequence, but is\n>>> advertised as UTF-8\n>>>    5. You end up with a screwed-up commit\n>>>\n>>> You could work around this, but I suggest just joining the 21st\n>>> century and working exclusively in UTF-8, it makes things much easier,\n>>> speaking as someone with 3x more non-ASCII characters their his name\n>>> than you :)\n>>>\n>> Ok, then the question is: How do I switch to UTF-8?\n>>\n>> To me it seems I'm already using it:\n>> $ locale charmap\n>> UTF-8\n> Your .gitconfig has an ISO-8859-1 string, from an earlier mail of yours:\n>\n>> $ git config -l | grep Noralf | xxd\n>> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n>> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n> On a system configured for UTF-8 this would be:\n>\n> $ echo Noralf Trønnes | xxd\n> 0000000: 4e6f 7261 6c66 2054 72c3 b86e 6e65 730a  Noralf Tr..nnes.\n>\n> Note the \"f8\" v.s. \"c3 b8\".\n>\n\nYes:\n$ echo Noralf Trønnes | xxd\n0000000: 4e6f 7261 6c66 2054 72f8 6e6e 6573 0a    Noralf Tr.nnes.\n\nIs there a command I can run that shows that I'm using ISO-8859-1 ?\nI need something to google with, my previous search only gave locale \nstuff, which seems fine.\n"},{"id":"254961","messageId":"CACBZZX7Sfm2hX=+cMOshMxvoFR2k0R4VH2anQtwxFS_Gw=WFBQ@mail.gmail.com","threadId":"38413","inReplyTo":"54BECAE0.70309@tronnes.org","subject":"Re: Git messes up 'ø' character","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2015-01-20T21:57:43Z","receivedAt":"2015-01-20T21:57:43Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jan 20, 2015 at 10:38 PM, Noralf Trønnes <notro@tronnes.org> wrote:\n> Den 20.01.2015 22:26, skrev Ævar Arnfjörð Bjarmason:\n>\n>> On Tue, Jan 20, 2015 at 10:23 PM, Noralf Trønnes <notro@tronnes.org>\n>> wrote:\n>>>\n>>> Den 20.01.2015 21:45, skrev Ævar Arnfjörð Bjarmason:\n>>>\n>>>> On Tue, Jan 20, 2015 at 9:17 PM, Noralf Trønnes <notro@tronnes.org>\n>>>> wrote:\n>>>>>\n>>>>> Den 20.01.2015 21:07, skrev Torsten Bögershausen:\n>>>>>>\n>>>>>> On 2015-01-20 20.46, Noralf Trønnes wrote:\n>>>>>> could it be that your \"ø\" is not encoded as UTF-8,\n>>>>>> but in ISO-8859-15 (or so)\n>>>>>>\n>>>>>>> $ git log -1\n>>>>>>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79\n>>>>>>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>\n>>>>>>\n>>>>>> What does\n>>>>>> git config -l | grep Noralf | xxd\n>>>>>> say ?\n>>>>>>\n>>>>> $ git config -l | grep Noralf | xxd\n>>>>> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n>>>>> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n>>>>>\n>>>>> $ file ~/.gitconfig\n>>>>> /home/pi/.gitconfig: ISO-8859 text\n>>>>\n>>>> What's happened here is that:\n>>>>\n>>>>    1. You've authored your commit in ISO-8859-1\n>>>>    2. Git itself has no place for the encoding of the author name in the\n>>>> commit object format\n>>>>    3. git-format-patch has a --compose-encoding which I think would sort\n>>>> this out if you set it to ISO-8859-1, but it defaults to UTF-8\n>>>>    4. Your patch is actually a ISO-8859-1 byte sequence, but is\n>>>> advertised as UTF-8\n>>>>    5. You end up with a screwed-up commit\n>>>>\n>>>> You could work around this, but I suggest just joining the 21st\n>>>> century and working exclusively in UTF-8, it makes things much easier,\n>>>> speaking as someone with 3x more non-ASCII characters their his name\n>>>> than you :)\n>>>>\n>>> Ok, then the question is: How do I switch to UTF-8?\n>>>\n>>> To me it seems I'm already using it:\n>>> $ locale charmap\n>>> UTF-8\n>>\n>> Your .gitconfig has an ISO-8859-1 string, from an earlier mail of yours:\n>>\n>>> $ git config -l | grep Noralf | xxd\n>>> 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf\n>>> 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.\n>>\n>> On a system configured for UTF-8 this would be:\n>>\n>> $ echo Noralf Trønnes | xxd\n>> 0000000: 4e6f 7261 6c66 2054 72c3 b86e 6e65 730a  Noralf Tr..nnes.\n>>\n>> Note the \"f8\" v.s. \"c3 b8\".\n>>\n>\n> Yes:\n> $ echo Noralf Trønnes | xxd\n> 0000000: 4e6f 7261 6c66 2054 72f8 6e6e 6573 0a    Noralf Tr.nnes.\n>\n> Is there a command I can run that shows that I'm using ISO-8859-1 ?\n> I need something to google with, my previous search only gave locale stuff,\n> which seems fine.\n\nWhat does this give you, this is UTF-8.\n\n$ echo git commit --author=\"Noralf Trønnes <notro@tronnes.org>\" | xxd\n0000000: 6769 7420 636f 6d6d 6974 202d 2d61 7574  git commit --aut\n0000010: 686f 723d 4e6f 7261 6c66 2054 72c3 b86e  hor=Noralf Tr..n\n0000020: 6e65 7320 3c6e 6f74 726f 4074 726f 6e6e  nes <notro@tronn\n0000030: 6573 2e6f 7267 3e0a                      es.org>.\n\nTo see if you're using UTF-8 just look at the codepoints for the\nnon-ASCII characters you're using and check if they're valid UTF-8.\nE.g. you can check this out:\nhttp://en.wikipedia.org/wiki/%C3%98#Computers\n\nWhich shows you that the UTF-8 hex version is C3 B8, but the Latin-1\nis F8, you're emitting F8, I'm emitting C3 B8.\n"},{"id":"254963","messageId":"20150120221802.GJ2350@localhost","threadId":"38413","inReplyTo":"54BECAE0.70309@tronnes.org","subject":"Re: Git messes up 'ø' character","fromName":"Nico Williams","fromEmail":"nico@cryptonector.com","sentAt":"2015-01-20T22:18:06Z","receivedAt":"2015-01-20T22:18:06Z","isPatch":false,"sender":{"key":"nico@cryptonector.com","avatar":null},"body":"On Tue, Jan 20, 2015 at 10:38:40PM +0100, Noralf Trønnes wrote:\n> Yes:\n> $ echo Noralf Trønnes | xxd\n> 0000000: 4e6f 7261 6c66 2054 72f8 6e6e 6573 0a    Noralf Tr.nnes.\n> \n> Is there a command I can run that shows that I'm using ISO-8859-1 ?\n> I need something to google with, my previous search only gave locale\n> stuff, which seems fine.\n\nThe locale(1) command tells you what your locale is set to, but it\ndoesn't say anything about your input method -- it only tells you what\nyour shell and commands started from it expect for input and what they\nshould produce for output.\n\nThe input method will generally be part of your windowing environment,\nfor which you'll have to search how to check/configure your OS\n(sometimes it can be set on a per-window basis, sometimes it's a global\nsetting).\n\nEven if the windowing environment is set to UTF-8, your terminal\nemulator might be set to ISO-8859-something, so check the terminal\nemulator (e.g., rxvt, Terminator, GNOME Terminal, PuTTY, ...).\n\nFinally, check what stty(1) says (e.g., on Linux it should show that\niutf8 is enabled) (this is mostly so that when you backspace in cooked\nmode the line discipline knows how many bytes to drop from the buffer).\n\nNico\n-- \n"},{"id":"254964","messageId":"54BED5FF.40107@tronnes.org","threadId":"38413","inReplyTo":"20150120221802.GJ2350@localhost","subject":"Re: Git messes up 'ø' character","fromName":"Noralf Trønnes","fromEmail":"notro@tronnes.org","sentAt":"2015-01-20T22:26:07Z","receivedAt":"2015-01-20T22:26:07Z","isPatch":false,"sender":{"key":"notro@tronnes.org","avatar":null},"body":"Den 20.01.2015 23:18, skrev Nico Williams:\n> On Tue, Jan 20, 2015 at 10:38:40PM +0100, Noralf Trønnes wrote:\n>> Yes:\n>> $ echo Noralf Trønnes | xxd\n>> 0000000: 4e6f 7261 6c66 2054 72f8 6e6e 6573 0a    Noralf Tr.nnes.\n>>\n>> Is there a command I can run that shows that I'm using ISO-8859-1 ?\n>> I need something to google with, my previous search only gave locale\n>> stuff, which seems fine.\n> The locale(1) command tells you what your locale is set to, but it\n> doesn't say anything about your input method -- it only tells you what\n> your shell and commands started from it expect for input and what they\n> should produce for output.\n>\n> The input method will generally be part of your windowing environment,\n> for which you'll have to search how to check/configure your OS\n> (sometimes it can be set on a per-window basis, sometimes it's a global\n> setting).\n>\n> Even if the windowing environment is set to UTF-8, your terminal\n> emulator might be set to ISO-8859-something, so check the terminal\n> emulator (e.g., rxvt, Terminator, GNOME Terminal, PuTTY, ...).\n\nI use putty which was set to ISO-8859-1. Changing this to UTF-8 gave me \nthe correct result:\n$ echo Noralf Trønnes | xxd\n0000000: 4e6f 7261 6c66 2054 72c3 b86e 6e65 730a  Noralf Tr..nnes.\n\nThank you all for helping me!\n"},{"id":"255074","messageId":"54C0C9E6.50207@drmicha.warpmail.net","threadId":"38413","inReplyTo":"54BED5FF.40107@tronnes.org","subject":"Re: Git messes up 'ø' character","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-01-22T09:59:02Z","receivedAt":"2015-01-22T09:59:02Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Noralf Trønnes schrieb am 20.01.2015 um 23:26:\n> Den 20.01.2015 23:18, skrev Nico Williams:\n>> On Tue, Jan 20, 2015 at 10:38:40PM +0100, Noralf Trønnes wrote:\n>>> Yes:\n>>> $ echo Noralf Trønnes | xxd\n>>> 0000000: 4e6f 7261 6c66 2054 72f8 6e6e 6573 0a    Noralf Tr.nnes.\n>>>\n>>> Is there a command I can run that shows that I'm using ISO-8859-1 ?\n>>> I need something to google with, my previous search only gave locale\n>>> stuff, which seems fine.\n>> The locale(1) command tells you what your locale is set to, but it\n>> doesn't say anything about your input method -- it only tells you what\n>> your shell and commands started from it expect for input and what they\n>> should produce for output.\n>>\n>> The input method will generally be part of your windowing environment,\n>> for which you'll have to search how to check/configure your OS\n>> (sometimes it can be set on a per-window basis, sometimes it's a global\n>> setting).\n>>\n>> Even if the windowing environment is set to UTF-8, your terminal\n>> emulator might be set to ISO-8859-something, so check the terminal\n>> emulator (e.g., rxvt, Terminator, GNOME Terminal, PuTTY, ...).\n> \n> I use putty which was set to ISO-8859-1. Changing this to UTF-8 gave me \n> the correct result:\n> $ echo Noralf Trønnes | xxd\n> 0000000: 4e6f 7261 6c66 2054 72c3 b86e 6e65 730a  Noralf Tr..nnes.\n> \n> Thank you all for helping me!\n> \n\nYou can also check the encoding of your config file with\n\nfile .git/config\n\nor \":set fileencoding\" in vim. \":set fileencoding=utf8\" would allow you\nto convert it easily.\n\n(This assumes that the file does not mix encodings.)\n\nMichael\n"}]}