From: "Zoltán Füzesi" <zfuzesi@eaglet.hu>
To: git@vger.kernel.org
Cc: giuseppe.bilotta@gmail.com, "Zoltán Füzesi" <zfuzesi@eaglet.hu>
Subject: [PATCH/RFC] gitweb: parse_commit_text encoding fix
Date: Sat, 1 Aug 2009 10:28:43 +0200 [thread overview]
Message-ID: <1249115323-17974-1-git-send-email-zfuzesi@eaglet.hu> (raw)
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 <zfuzesi@eaglet.hu>
---
gitweb/gitweb.perl | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7fbd5ff..06bbf60 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2570,22 +2570,21 @@ 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/^([^<]+) <([^>]*)>/) {
- $co{'author_name'} = $1;
+ $co{'author_name'} = to_utf8($1);
$co{'author_email'} = $2;
} else {
$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_name'} = to_utf8($1);
$co{'committer_email'} = $2;
} else {
$co{'committer_name'} = $co{'committer'};
--
1.6.4.13.ge6580
next reply other threads:[~2009-08-01 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 8:28 Zoltán Füzesi [this message]
2009-08-01 9:21 ` [PATCH/RFC] gitweb: parse_commit_text encoding fix Jakub Narebski
2009-08-01 16:55 ` Füzesi Zoltán
2009-08-02 7:42 ` [PATCH] " Zoltán Füzesi
2009-08-04 6:59 ` Junio C Hamano
2009-08-06 8:15 ` Zoltán Füzesi
2009-08-07 20:31 ` Jakub Narebski
2009-08-07 0:41 ` Jakub Narebski
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=1249115323-17974-1-git-send-email-zfuzesi@eaglet.hu \
--to=zfuzesi@eaglet.hu \
--cc=git@vger.kernel.org \
--cc=giuseppe.bilotta@gmail.com \
/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).