<?

$s1=$s;
$s = str_replace("%D0%81","Ё",$s);
$s = str_replace("%d0%81","Ё",$s);
$s = str_replace("%D1%91","ё",$s);
$s = str_replace("%d1%91","ё",$s);
for ($i=144;$i<192;$i++) {$stmp = "%D0".urlencode(chr($i)); $s = str_replace(strtoupper($stmp),chr($i+48),$s); $s = str_replace(strtolower($stmp),chr($i+48),$s);}
for ($i=128;$i<144;$i++) {$stmp = "%D1".urlencode(chr($i)); $s = str_replace(strtoupper($stmp),chr($i+112),$s);$s = str_replace(strtolower($stmp),chr($i+112),$s);}
//if ($s==$s1)
$s = urldecode($s);
?>