git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jakub Narębski" <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: The gitweb author initials feature from a36817b doesn't work with i18n names
Date: Thu, 29 Aug 2013 16:44:42 +0200	[thread overview]
Message-ID: <CANQwDwcyV7N6xPxaYFUnRQptVabwkd_mFconZPGDm9iGS3LArA@mail.gmail.com> (raw)
In-Reply-To: <CACBZZX4i-Tu1G07e9=5DYFjY9EtRGO8gLJf71d5aLeaE-cj-8w@mail.gmail.com>

[Ævar, sorry for duplication but I accidentally send HTML email; stupid Gmail]

On Thu, Aug 29, 2013 at 4:26 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:

> The @author_initials feature Jakub added in a36817b claims to use a
> i18n regexp (/\b([[:upper:]])\B/g), but in Perl this doesn't actually
> do anything unless the string being matched against has the UTF8 flag.
>
> So as a result it abbreviates me to "AB" not "ÆAB".
[...]

Thanks for catching this, and for an analysis.

> Jakub, do you see a reason not to just apply this:
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index f429f75..29b3fb5 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -6631,6 +6631,7 @@ sub git_blame_common {
>                         $hash_base, '--', $file_name
>                         or die_error(500, "Open git-blame --porcelain failed");
>         }
> +       binmode $fd, ":utf8";
>
>         # incremental blame data returns early
>         if ($format eq 'data') {
>
> I haven't gotten an env where I can test gitweb running, but that
> looks like it should work to me.

Unfortunetly I cannot check this either, but it looks obviously correct.
ACK.

-- 
Jakub Narebski

  reply	other threads:[~2013-08-29 14:45 UTC|newest]

Thread overview: 11+ 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 [this message]
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
2013-08-31 16:29         ` Ævar Arnfjörð Bjarmason

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=CANQwDwcyV7N6xPxaYFUnRQptVabwkd_mFconZPGDm9iGS3LArA@mail.gmail.com \
    --to=jnareb@gmail.com \
    --cc=avarab@gmail.com \
    --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.
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).