From 927cd1fc940f7b588521b388aeb610ab3890399e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E5=BF=A0=E5=B1=B1?= Date: Thu, 4 Aug 2011 23:52:55 +0800 Subject: [PATCH] gitweb: pass string after encoding in utf-8 to syntax highlighter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Otherwise the highlight filter would work on a corrupt byte sequence. Signed-off-by: å¼ å¿ å±± Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index dab89f2eb..48def3841 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -6465,7 +6465,7 @@ sub git_blob { $nr++; $line = untabify($line); printf qq!
%4i %s
\n!, - $nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? $line : esc_html($line, -nbsp=>1); + $nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? to_utf8($line) : esc_html($line, -nbsp=>1); } } close $fd -- 2.30.2