Eskerrak geure psicologo programadorieri:
http://php.apsique.com/node/536
Neure kasuen bakarrik biher dot ia utf-8 badan, orduen ba kodigo zati bat bakarrik hartun got:
function is_utf8($text) { $result = false; for($i=0; $i<strlen($text); $i++) { $byte = ord($text[$i]); if ($byte & 0x80) $result = true; } return $result; }
function is_utf8( $text )
{
$result = false;
$i = 0;
$j = count( $text );
while( $i < $j && false === $result )
{
$result = ord( $text[$i] ) & 0x80;
$i++;
}
return $result;
}