semya:
utf8_encode / utf8_decode ?
эти функции не перекодируют win1251
я нашел такую функцию, если кому надо:
//перекодировка win->unicode
function cyr_code ($in_text){
$output="";
$other[1025]="Ё";
$other[1105]="ё";
$other[1028]="Є";
$other[1108]="є";
$other[1030]="I";
$other[1110]="i";
$other[1031]="Ї";
$other[1111]="ї";
for ($i=0; $i if (ord($in_text{$i})>191){
$output.="".(ord($in_text{$i})+848).";";
} else {
if (array_search($in_text{$i}, $other)===false){
$output.=$in_text{$i};
} else {
$output.="".array_search($in_text{$i}, $other).";";
}
}
}
return $output;
}
?>