utf 8 - PHP: Convert any string to UTF-8 without knowing the original character set, or at least try
There is no way to identify the charset of a string that is completely accurate. There are ways to try to guess the charset. One of these ways, and probably/currently the best in PHP, is mb_detect_encoding(). This will scan your string and look for occurr...