To solve the problem of data garbled in phpMyAdmin2.6 or later versions, read and solve the problem of data garbled in phpMyAdmin2.6 or later versions. because phpMyAdmin2.6 or later versions support multi-language sets, we can use phpMyAdmin to manage databases, the query results contain garbled Chinese characters, but these problems are not found in our PHP program calls. It seems phpMyAdm "> <LINK
PhpMyAdmin2.6 and later versions support multi-language sets, so when we use phpMyAdmin to manage the database, the Chinese query is garbled, but there is no such problem during our PHP program calls.
It seems that phpMyAdmin2.6 has a problem with the configuration. to solve this problem, I searched for related information on google. There are many such problems, but none of them can solve them, it seems that you have only done it yourself.
... The process of searching source code is cumbersome
It took half a day to finally find a compromise.
Go to the root directory of phpMyAdmin2.6 and open the following file:
Libraries/select_lang.lib.php
1, find the line with "zh-gb2312", change 'zh-gb2312 'to 'zh-gb2312-utf-8'
Why? This is because the server will filter out the language without "-UTF-8". in line 168th of libraries/database_interface.lib.php, "to prevent confusion",: <
Or if you do not change 'zh-gb2312 'to 'zh-gb2312-utf-8', you can remove the filter. If it is removed, it will be OK.
2. find "$ mysql_charset_map = array (" that line
Set 'gb2312' => 'gb2312 ',
Change to 'gb2312' => 'latin1 ',
Save, OK, go to phpMyAdmin management, select language chinese simplified (zh-gb2312-utf-8)
Let's look at your Chinese data.
Therefore, my solution is to modify the two words in the file libraries/select_lang.lib.php, which is convenient and quick. haha.