如何使用mb_detect_encoding检测编码是否正确?

时间:2009-12-04 10:48:53

标签: php character-encoding detection

我想检测编码是否正确,但我发现mb_detect_encoding总是得到错误结果,而且我添加了很多encoding_list UTF8 ISO-8859- * ....

1 个答案:

答案 0 :(得分:13)

您正在尝试执行仅有时有效的操作。编码检测不是一个精确的“科学”,所以你能做的最好的事情就是避免它。