From: "Shawn O. Pearce" <spearce@spearce.org>
To: Finn Arne Gangstad <finnag@pvv.org>
Cc: git@vger.kernel.org
Subject: Re: git gui blame utf-8 bugs
Date: Fri, 14 Dec 2007 01:47:09 -0500 [thread overview]
Message-ID: <20071214064709.GH14735@spearce.org> (raw)
In-Reply-To: <20071212091744.GA5377@pvv.org>
Finn Arne Gangstad <finnag@pvv.org> wrote:
> git gui has some utf-8 bugs:
It has several. :-)
> If you do git gui blame <file>, and the file contains utf-8 text,
> the lines are not parsed as utf-8, but seemingly as iso-8859-1 instead.
Right. git-gui is keying off the environment setting for LANG, so I
guess its set to iso-8859-1 on your system but you are working with a
utf-8 file. We've talked about using something like .gitattributes
to store encoding hints, or to just put a global gui setting in
~/.gitconfig but neither has had any patches written for it.
UTF-8 is seemingly the most common encoding that git-gui is mangling
so maybe we should be defaulting to utf-8 until someone codes a
more intelligent patch.
> Also, the hovering comment is INITIALLY shown garbled (both Author and
> commit message), but if you click on a line, so that the commit
> message is shown in the bottom window, the hovering message is
> magically corrected to utf-8.
>
> The text in the lower window (showing specific commits) seems to
> always be handled correctly.
That's a "feature". :-)
What's happening here is the initial hovering message is obtained
from the machine formatted output from `git blame --incremental`
and in that format there is no encoding header so I'm just ignoring
any encoding problems.
Later when you click on a line it does `git cat-file commit $sha1`
and gets the proper encoding, and corrects the strings it originally
had gotten from git-blame. So the hovering message "fixes" itself
later on.
Maybe here too we should be defaulting to utf-8 instead of the
native encoding.
--
Shawn.
next prev parent reply other threads:[~2007-12-14 6:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 9:17 git gui blame utf-8 bugs Finn Arne Gangstad
2007-12-14 6:47 ` Shawn O. Pearce [this message]
2007-12-14 12:39 ` Jakub Narebski
2007-12-17 7:50 ` Finn Arne Gangstad
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071214064709.GH14735@spearce.org \
--to=spearce@spearce.org \
--cc=finnag@pvv.org \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).