]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Output valid utf8 in git_blame_common('data')
authorJürgen Kreileder <redacted>
Sat, 17 Dec 2011 09:22:23 +0000 (10:22 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
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 <redacted>
Acked-by: Jakub Narębski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 67b41e584f3120409e2cae97849549cf95caaa95c8d7dae3bf675aed05364389..0dbca9d055cf5f67cba476952780d4cd05f0e1d0b96efd080751cd1f1462f179 100755 (executable)
@@ -6245,7 +6245,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";
 
This page took 0.380547 seconds and 4 git commands to generate.