fix utf8 decoding

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
Kay Sievers 2005-11-23 04:26:40 +01:00
parent 5b7a14fb4d
commit 10bb903660

View File

@ -14,9 +14,10 @@ use CGI::Util qw(unescape);
use CGI::Carp qw(fatalsToBrowser); use CGI::Carp qw(fatalsToBrowser);
use Encode; use Encode;
use Fcntl ':mode'; use Fcntl ':mode';
binmode STDOUT, ':utf8';
my $cgi = new CGI; my $cgi = new CGI;
my $version = "252"; my $version = "253";
my $my_url = $cgi->url(); my $my_url = $cgi->url();
my $my_uri = $cgi->url(-absolute => 1); my $my_uri = $cgi->url(-absolute => 1);
my $rss_link = ""; my $rss_link = "";
@ -217,8 +218,8 @@ sub esc_url {
sub esc_html { sub esc_html {
my $str = shift; my $str = shift;
$str = escapeHTML($str);
$str = decode("utf8", $str, Encode::FB_DEFAULT); $str = decode("utf8", $str, Encode::FB_DEFAULT);
$str = escapeHTML($str);
return $str; return $str;
} }