function iso2utf8($s) /* Convert chars repr. by 1 or 2 bytes in utf8 */ { $t=""; $n=strlen($s); for ($i=0;$i<$n;$i++) { $c=ord($s[$i]); if ($c>127) { $t.=chr(192|($c/64)).chr(128|$c&63); } else { $t.=$s[$i]; } } return $t; }