Solve phpMyAdmin Chinese UTF-8 garbled problem thoroughly
phpMyAdmin Chinese garbled problem is very common, but also very annoying. Previously used phpMyAdmin relatively few, recently installed after feeling very convenient, but also encountered the problem of Chinese garbled, mainly UTF-8 and GB2312 encoding can not be displayed correctly at the same time. Found some information from the Internet, but are not very direct, now combined with their own operations to reorganize.
1. Because MySQL's default encoding is latin1, we first need to modify the phpMyAdmin encoding conversion. Modify the select_lang.lib.php file under the Libraries directory to
1. ' Utf-8 ' => ' UTF8 ',
2. Modified into
3. ' Utf-8 ' => ' latin1 ',
2. The next step is to modify the encoding of the page to show
1. ' zh-gb2312 ' => array (' Zh|chinese simplified ', ' chinese_simplified-gb2312 ', ' ' zh '),
2. Modified into
3. ' Zh-gb2312-utf-8 ' => array (' Zh|chinese simplified ', ' chinese_simplified-gb2312 ', ' ' zh '),
That is, add-utf-8 behind the zh-gb2312, so that the page code supports UTF-8.
3. First select Zh-gb2312-utf-8 into phpMyAdmin, this time browsing GB2312 encoded data is normal, but browse UTF-8 data is garbled. If you browse UTF-8 data, go to the home page, and then choose Zh-utf-8 on the language.
A few notes:
1. The default language encoding is very long, you can annotate other encodings with/**/, leaving only Zh-gb2312-utf-8 and zh-utf-8 two encodings.
2. The latest version of the current phpMyAdmin is 2.8.0-r
</