- mb_detect_encoding: documentation ( source)
<?php
$str1 = "Jeanâ€Paul";
$str2 = "Jean-Paul";
$str3 = iconv(mb_detect_encoding($str2), mb_detect_encoding($str1).'//TRANSLIT', $str1);
if ($str3 == $str2) {
echo "equal";
} else {
echo "different";
}