用mb_detect_encoding(); $str = 'áéóú'; // 编码ISO-8859-1 mb_detect_encoding($str, 'UTF-8', true); // 判断结果false
用mb_detect_encoding();