What do you think about using function mb_check_encoding to check utf8 string? i.e.:
function utf8_is_valid($str) { if (function_exists('mb_check_encoding')) { return mb_check_encoding($str, 'UTF-8'); }
...
The mb_check_encoding is not doing a good job checking the encoding according to standards. Check http://php.net/manual/en/function.mb-check-encoding.php
Log in to post a comment.
The mb_check_encoding is not doing a good job checking the encoding according to standards. Check http://php.net/manual/en/function.mb-check-encoding.php