PHP (as the current mainstream development language) MyAdmin's Chinese garbled problem is very common, but also very annoying. Before using PHP (as the current mainstream development language) MyAdmin 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 the default encoding for MySQL (and the best combination of PHP) is latin1, first we need to revise the Code conversion of PHP (as the current mainstream development language) MyAdmin. Modify the select_lang.lib.php (as the current mainstream development language) file under the Libraries directory to
[Indent]
Utf-8 = UTF8,
Modified into
Utf-8 = Latin1,
[/indent]
2. The next step is to modify the page encoding display,
[Indent]
zh-gb2312 = Array (Zh|chinese simplified, chinese_simplified-gb2312, zh),
Modified into
Zh-gb2312-utf-8 = Array (Zh|chinese simplified, chinese_simplified-gb2312, zh),
[/indent]
That is, add-utf-8 after zh-gb2312, so that the page encoding supports UTF-8.
3. First select Zh-gb2312-utf-8 into PHP (as the current mainstream development language) MyAdmin, this time to browse GB2312 encoded data is normal, but browsing 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 inside.
A few notes:
1. The default language encoding is long, you can comment out other encodings with/**/, leaving only Zh-gb2312-utf-8 and zh-utf-8 two encodings.
2. Currently PHP (as the current mainstream development language) MyAdmin The latest version is 2.8.0-RC1, but this version of the first page of the selected language can not be specific to the encoding, so it is not recommended.
http://www.bkjia.com/PHPjc/508897.html www.bkjia.com true http://www.bkjia.com/PHPjc/508897.html techarticle PHP (as the current mainstream development language) MyAdmin's Chinese garbled problem is very common, but also very annoying. Previously with PHP (as the current mainstream development language) MyAdmin relatively few, recently loaded with ...