From: "Jakub Narębski" <jnareb@gmail.com>
To: "Kyle J. McKay" <mackyle@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git Mailing List" <git@vger.kernel.org>,
"Junio C Hamano" <gitster@pobox.com>,
"Simon Ruderich" <simon@ruderich.org>
Subject: Re: [PATCH] gitweb: Fix the author initials in blame for non-ASCII names
Date: Sat, 31 Aug 2013 18:42:36 +0200 [thread overview]
Message-ID: <CANQwDwdrmyMLZ299t4T-o6uGmfbHL_A83R37_zy0-jyFXEq1+A@mail.gmail.com> (raw)
In-Reply-To: <74435A51-B404-4EC8-8CF8-6289F49E6DBD@gmail.com>
On Fri, Aug 30, 2013 at 11:39 PM, Kyle J. McKay <mackyle@gmail.com> wrote:
> On Aug 30, 2013, at 11:13, Junio C Hamano wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>>> + binmode $fh, ':utf8';
> What happens if the author name is written in ISO-8859-1 instead of UTF-8 in
> the actual commit object itself?
>
> I'm pretty sure I've seen this where older commits have a ISO-8859-1 author
> name and then newer commits have a UTF-8 version of the same author's name.
>
> In fact, in the git repository itself, look at commit 0cb3f80d (UTF-8) and
> commit 7eb93c89 (ISO-8859-1) to see this in action.
Well, then you have a problem, though it is only with old history (before
introduction of "encoding" header in commit object).
Better and more complete solution would be to use to_utf8() function
instead of 'utf8' layer, which when finding invalid UTF-8 sequence uses
$fallback_encoding (by default "latin1", i.e. ISO-8859-1) instead.
In my TODO list is creating PerlIO layer ':utf8-with-fallback' which would
replace all those to_utf8() calls...
--
Jakub Narebski
next prev parent reply other threads:[~2013-08-31 16:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 14:26 The gitweb author initials feature from a36817b doesn't work with i18n names Ævar Arnfjörð Bjarmason
2013-08-29 14:44 ` Jakub Narębski
2013-08-29 16:39 ` Simon Ruderich
2013-08-30 8:37 ` [PATCH] gitweb: Fix the author initials in blame for non-ASCII names Ævar Arnfjörð Bjarmason
2013-08-30 18:05 ` Junio C Hamano
2013-08-30 18:08 ` Jakub Narębski
2013-08-30 18:13 ` Junio C Hamano
2013-08-30 18:31 ` Simon Ruderich
2013-08-30 21:39 ` Kyle J. McKay
2013-08-31 16:42 ` Jakub Narębski [this message]
2013-08-31 16:29 ` Ævar Arnfjörð Bjarmason
-- strict thread matches above, loose matches on Subject: below --
2014-03-17 9:21 Kicer Jiao
2014-03-17 9:34 ` Kicer Jiao
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=CANQwDwdrmyMLZ299t4T-o6uGmfbHL_A83R37_zy0-jyFXEq1+A@mail.gmail.com \
--to=jnareb@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mackyle@gmail.com \
--cc=simon@ruderich.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.
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).