From 57cf4ad6e82af6aaa38bb215ea35ea9c465c6045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Kreileder?= Date: Sat, 17 Dec 2011 10:22:23 +0100 Subject: gitweb: Output valid utf8 in git_blame_common('data') MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise when javascript-actions are enabled gitweb shown broken author names in the tooltips on blame pages ('blame_incremental' view). Signed-off-by: Jürgen Kreileder Acked-by: Jakub Narębski Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gitweb/gitweb.perl') diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index a9f39d59c..dc2ad9d4a 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -6108,7 +6108,9 @@ sub git_blame_common { -type=>"text/plain", -charset => "utf-8", -status=> "200 OK"); local $| = 1; # output autoflush - print while <$fd>; + while (my $line = <$fd>) { + print to_utf8($line); + } close $fd or print "ERROR $!\n"; -- cgit v1.2.1