Encoding detecting php

2019-03-03 13:20发布

问题:

I have fallowing string: Ëè÷íûå âñòðå÷è How to encode this string int UTF-8 file PHP?

I spend all day to get how to do this.

回答1:

I think this is what you are looking for:

http://www.php.net/manual/en/function.mb-detect-encoding.php

However, I seem to remember it is quite difficult to detect encoding. On the other hand it is eay to convert if you know the source encoding:

http://www.php.net/manual/en/function.mb-convert-encoding.php



标签: php encoding