iconv_strlen():
<?php
$str = "Vær så god!";
echo "The string has length: ", iconv_strlen($str, 'utf8');
?>
Output:
The string has length: 11
iconv_substr():
<?php
iconv_set_encoding('internal_encoding', 'utf8');
$str = "Vær så god!";
echo "The first 7 characters are: ", iconv_substr($str, 0, 7);
?>
Output:
The first 7 characters are: Vær så