Solve the Problem of phpMyAdmin data garbled-go

Source: Internet
Author: User
Solution PhpMyAdminData garbled problem after MySQL 5.0 is installed recently, put the data table 4.3.6 into the data folder and go PhpMyAdminI read the MySQL 5.0 manual again and found that I had added several character_set _ %, but I still failed to fix it after changing n ^ 2 times, however, it is normal to select data from the PHP program. the problem is PhpMyAdminThe problem ..

InPhpMyAdmin2.6The above versions support multilingual sets, so we can use them.PhpMyAdminDuring database management, the query results contain garbled Chinese characters, but these problems are not found in our PHP program calls.
It seems thatPhpMyAdmin2.6There is a problem with the configuration. To solve this problem, I searched for relevant information on Google. There are many such problems, but none of them can solve them, it seems that you have to solve it by yourself .... Because the process of searching source code is very cumbersome, it took me half a day to find a compromise. GoPhpMyAdmin2.6Open the following file: libraries/select_lang.lib.php

1, find the line that has "zh-gb2312", change 'zh-gb2312 'to 'zh-gb2312-utf-8' Why add it like this? 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 changes 'gb2312' => 'gb2312 'to 'gb2312' => 'latin1', save, OK, and enterPhpMyAdminManagement, select the language Chinese Simplified (zh-gb2312-utf-8) and then 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.