Voting

: six plus zero?
(Example: nine)

The Note You're Voting On

standov at cgu dot kiev dot ua
20 years ago
He is improved function to decode win1251->UTF8
<?php
function win2utf($s){
$c209 = chr(209); $c208 = chr(208); $c129 = chr(129);
for(
$i=0; $i<strlen($s); $i++) {
$c=ord($s[$i]);
if (
$c>=192 and $c<=239) $t.=$c208.chr($c-48);
elseif (
$c>239) $t.=$c209.chr($c-112);
elseif (
$c==184) $t.=$c209.$c209;
elseif (
$c==168) $t.=$c208.$c129;
else
$t.=$s[$i];
}
return
$t;
}
?>

<< Back to user notes page

To Top