From: Zoltán Füzesi Date: Sun, 2 Aug 2009 07:42:24 +0000 (+0200) Subject: gitweb: parse_commit_text encoding fix X-Git-Tag: v1.6.4.1~3^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ed5bbc7e1c3a0144db42d6ec4689e01b2f37516;p=git.git gitweb: parse_commit_text encoding fix Call to_utf8 when parsing author and committer names, otherwise they will appear with bad encoding if they written by using chop_and_escape_str. Signed-off-by: Zoltán Füzesi Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 7fbd5ff89..4f051942b 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2570,7 +2570,7 @@ sub parse_commit_text { } elsif ((!defined $withparents) && ($line =~ m/^parent ([0-9a-fA-F]{40})$/)) { push @parents, $1; } elsif ($line =~ m/^author (.*) ([0-9]+) (.*)$/) { - $co{'author'} = $1; + $co{'author'} = to_utf8($1); $co{'author_epoch'} = $2; $co{'author_tz'} = $3; if ($co{'author'} =~ m/^([^<]+) <([^>]*)>/) { @@ -2580,10 +2580,9 @@ sub parse_commit_text { $co{'author_name'} = $co{'author'}; } } elsif ($line =~ m/^committer (.*) ([0-9]+) (.*)$/) { - $co{'committer'} = $1; + $co{'committer'} = to_utf8($1); $co{'committer_epoch'} = $2; $co{'committer_tz'} = $3; - $co{'committer_name'} = $co{'committer'}; if ($co{'committer'} =~ m/^([^<]+) <([^>]*)>/) { $co{'committer_name'} = $1; $co{'committer_email'} = $2;