Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有闲置字符串:Ëè÷íûå âñòðå÷è 如何将此字符串编码为 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