git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "Noralf Trønnes" <notro@tronnes.org>,
	"Torsten Bögershausen" <tboegi@web.de>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: Git messes up 'ø' character
Date: Wed, 21 Jan 2015 05:05:43 +0800	[thread overview]
Message-ID: <20150120210543.GA13382@kroah.com> (raw)
In-Reply-To: <CACBZZX58Di=m2YEKRuAsuU=bqUXjQhN21tvjRL8Z1Vbuyk2fKQ@mail.gmail.com>

On Tue, Jan 20, 2015 at 09:45:46PM +0100, Ævar Arnfjörð Bjarmason wrote:
> On Tue, Jan 20, 2015 at 9:17 PM, Noralf Trønnes <notro@tronnes.org> wrote:
> > Den 20.01.2015 21:07, skrev Torsten Bögershausen:
> >>
> >> On 2015-01-20 20.46, Noralf Trønnes wrote:
> >> could it be that your "ø" is not encoded as UTF-8,
> >> but in ISO-8859-15 (or so)
> >>
> >>> $ git log -1
> >>> commit b2a4f6abdb097c4dc092b56995a2af8e42fbea79
> >>> Author: Noralf Tr<F8>nnes <notro@tronnes.org>
> >>
> >> What does
> >> git config -l | grep Noralf | xxd
> >> say ?
> >>
> > $ git config -l | grep Noralf | xxd
> > 0000000: 7573 6572 2e6e 616d 653d 4e6f 7261 6c66  user.name=Noralf
> > 0000010: 2054 72f8 6e6e 6573 0a                    Tr.nnes.
> >
> > $ file ~/.gitconfig
> > /home/pi/.gitconfig: ISO-8859 text
> 
> 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
>  3. git-format-patch has a --compose-encoding which I think would sort
> this out if you set it to ISO-8859-1, but it defaults to UTF-8
>  4. Your patch is actually a ISO-8859-1 byte sequence, but is
> advertised as UTF-8
>  5. You end up with a screwed-up commit
> 
> You could work around this, but I suggest just joining the 21st
> century and working exclusively in UTF-8, it makes things much easier,
> speaking as someone with 3x more non-ASCII characters their his name
> than you :)

So how exactly do you fix this using UTF-8?  Git is exporting a UTF-8
"From:" line so it thinks the character is correct, but it's not
creating something properly here.

confused,

greg k-h

  reply	other threads:[~2015-01-20 21:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 19:46 Git messes up 'ø' character Noralf Trønnes
2015-01-20 20:07 ` Torsten Bögershausen
2015-01-20 20:17   ` Noralf Trønnes
2015-01-20 20:45     ` Ævar Arnfjörð Bjarmason
2015-01-20 21:05       ` Greg Kroah-Hartman [this message]
2015-01-20 21:20       ` Jeff King
2015-01-20 21:27         ` Ævar Arnfjörð Bjarmason
2015-01-20 21:23       ` Noralf Trønnes
2015-01-20 21:26         ` Ævar Arnfjörð Bjarmason
2015-01-20 21:38           ` Noralf Trønnes
2015-01-20 21:57             ` Ævar Arnfjörð Bjarmason
2015-01-20 22:18             ` Nico Williams
2015-01-20 22:26               ` Noralf Trønnes
2015-01-22  9:59                 ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150120210543.GA13382@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=notro@tronnes.org \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).