I have fallow string: Ëè÷íûå âñòðå÷è如何编码这个字符串int UTF-8文件PHP?
我花了一整天的时间来了解如何做到这一点。
我认为这就是您要查找的:
http://www.php.net/manual/en/function.mb-detect-encoding.php
但是,我似乎记得很难检测编码。另一方面,如果您知道源编码,则很容易进行转换:
http://www.php.net/manual/en/function.mb-convert-encoding.php