git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Output valid utf8 in git_blame_common('data')

From
Jürgen Kreileder <jk@blackdown.de>
Date
Nov 27, 2011, 23:52 UTC
Message-ID
<CAKD0Uuxq+wLdRy5r_hz9qgjHkDmFHHbeAVkb07HizX9xaGMptw@mail.gmail.com>

With javascript-actions enabled gitweb showed broken author names in the tooltips on blame pages.

Signed-off-by: Juergen Kreileder <jk@blackdown.de>
---
 gitweb/gitweb.perl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4f0c3bd..c863afe 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6107,7 +6107,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";
-- 
1.7.5.4
Next: Jakub Narebski
Message 1 of 2 in “gitweb: Output valid utf8 in git_blame_common('data')”
  1. gitweb: Output valid utf8 in git_blame_common('data')Jürgen Kreileder, Nov 27, 2011
  2. Jakub NarebskiNov 29, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.