From: eldy <> Date: Mon, 22 Dec 2003 20:06:45 +0000 (+0000) Subject: Some keyphrases were not decoded by decodeutfkeys plugin. X-Git-Tag: AWSTATS_6_0_RELEASE~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f15196cdc8d48794d59f244133b52bbf761d74c;p=thirdparty%2FAWStats.git Some keyphrases were not decoded by decodeutfkeys plugin. --- diff --git a/wwwroot/cgi-bin/plugins/decodeutfkeys.pm b/wwwroot/cgi-bin/plugins/decodeutfkeys.pm index b0b754e9..ec9d07b3 100644 --- a/wwwroot/cgi-bin/plugins/decodeutfkeys.pm +++ b/wwwroot/cgi-bin/plugins/decodeutfkeys.pm @@ -61,6 +61,7 @@ sub DecodeKey_decodeutfkeys { my $string = shift; my $encoding = shift; if (! $encoding) { error("Function DecodeKey from plugin decodeutfkeys was called but AWStats don't know language code required to output new value."); } + $string =~ s/\\x(\w\w)/%$1/gi; # Change "\xc4\xbe\xd7\xd3\xc3\xc0" into "%c4%be%d7%d3%c3%c0" $string=URI::Escape::uri_unescape($string); if ( $string =~ m/^([\x00-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef][\x80-\xbf][\x80-\xbf]|\xf0[\x90-\xbf][\x80-\xbf][\x80-\xbf]|[\xf1-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf])*$/ ) {