I have fallowing string: Ëè÷íûå âñòðå÷è How to encode this string int UTF-8 file PHP?
I spend all day to get how to do this.
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