From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Michele Ballabio <barra_cuda@katamail.com>,
git@vger.kernel.org, Peter Baumann <waste.manager@gmx.de>
Subject: Re: git-gui messes up the diff view on non ASCII characters
Date: Sun, 11 Nov 2007 11:20:43 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0711111120120.4362@racer.site> (raw)
In-Reply-To: <20071111055959.GW14735@spearce.org>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1765 bytes --]
Hi,
On Sun, 11 Nov 2007, Shawn O. Pearce wrote:
> Michele Ballabio <barra_cuda@katamail.com> wrote:
> > On Friday 09 November 2007, Peter Baumann wrote:
> > > I'm managing some UTF-8 encoded LaTeX files in git, which include some
> > > non ASCII characters like the german ä,ö and ü. If I view the diff with
> > > git-diff on an UTF8 enabled terminal, all looks nice. So does the diff
> > > view in gitk after I commited my changes. Only git-gui shows some
> > > "strange" characters, so I assume it is an encoding problem.
> > >
> > > I have to admit that I'm totally unaware how this should work, but at
> > > least I think my configuration is correct here, because otherwise git-diff
> > > or gitk would show the same behaviour. Is there anything which could be
> > > done to make git-gui happy, too?
> >
> > It's a known issue, and already on Shawn's ToDo list. I have to add that
> > viewing untracked UTF8 files in git-gui works just fine. Weird.
>
> Cute. That's because in the untracked case we open the file and
> let the platform's chosen encoding be used to convert it into the
> text viewer. In the tracked diff case we force the encoding to
> be in binary.
>
> Now gitk works because it assumes the diff is in the same character
> encoding as the commit message itself. Since commit messages are
> typically in UTF-8 (as that is the Git default encoding) then a
> UTF-8 encoded file shows correctly in gitk.
>
> What's the right behavior here? Just assume the platform encoding
> is correct for the file we are showing and show it? Assume the
> commit encoding configured in i18n.commitencoding is the correct
> one for the file content? Something else?
My twopence: assume utf-8, but make it a _git-gui_ config variable.
Ciao,
Dscho
prev parent reply other threads:[~2007-11-11 11:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 15:49 git-gui messes up the diff view on non ASCII characters Peter Baumann
2007-11-09 21:30 ` Michele Ballabio
2007-11-11 5:59 ` Shawn O. Pearce
2007-11-11 11:20 ` Johannes Schindelin [this message]
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=Pine.LNX.4.64.0711111120120.4362@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=barra_cuda@katamail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
--cc=waste.manager@gmx.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).