From 10bb9036604006979c3a168760b01812e5dbbb40 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 23 Nov 2005 04:26:40 +0100 Subject: [PATCH] fix utf8 decoding Signed-off-by: Kay Sievers --- gitweb.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gitweb.cgi b/gitweb.cgi index e0e71ce9..dc4435c0 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -14,9 +14,10 @@ use CGI::Util qw(unescape); use CGI::Carp qw(fatalsToBrowser); use Encode; use Fcntl ':mode'; +binmode STDOUT, ':utf8'; my $cgi = new CGI; -my $version = "252"; +my $version = "253"; my $my_url = $cgi->url(); my $my_uri = $cgi->url(-absolute => 1); my $rss_link = ""; @@ -217,8 +218,8 @@ sub esc_url { sub esc_html { my $str = shift; - $str = escapeHTML($str); $str = decode("utf8", $str, Encode::FB_DEFAULT); + $str = escapeHTML($str); return $str; } -- 2.11.0