Solve phpMyAdmin2.6 above version data garbled problem _php tutorial

Source: Internet
Author: User
In PHP (as the current mainstream development language) MyAdmin2.6 above because of the support of multi-language set, we use PHP (as the mainstream development language now) myadmin Management database, the query out of Chinese is garbled, but in our PHP ( As the current mainstream development language) program calls do not have these problems.
It seems that PHP (as the mainstream development language now) MyAdmin2.6 configuration has a problem, in order to solve this problem, I searched the relevant data on Google, this kind of problems, but there is no one can solve, really no way, it seems that only self-solved.

。。。 Because the process of finding the source code is cumbersome, a little

It took a half-day to finally find a more eclectic way to solve.

Go to PHP (as the current mainstream development language) under the root directory of MyAdmin2.6, open the following file:
Libraries/select_lang.lib.php (as the current mainstream development language)
1, find the "zh-gb2312" of the line, the zh-gb2312 changed to Zh-gb2312-utf-8
Why do you add it? That's because the server will filter out the language without "-utf-8", in the 168th line of libraries/database_interface.lib.php (the mainstream development language now), according to English: "To prevent confusion",:<

Or if you don't change the zh-gb2312 to Zh-gb2312-utf-8, you can remove the filter. Just remove that if and it's OK.

2. Find "$MySQL (best combination with PHP) _charset_map = Array (" The line
gb2312 = gb2312,
Change to gb2312 = Latin1,

Save, OK, enter PHP (as now mainstream development language) MyAdmin management, select language Chinese Simplified (zh-gb2312-utf-8)
Take a look at your Chinese data.

So, my solution is just to modify the libraries/select_lang.lib.php (as the current mainstream development language) in this document two words on the line, more convenient and fast, haha.

http://www.bkjia.com/PHPjc/508708.html www.bkjia.com true http://www.bkjia.com/PHPjc/508708.html techarticle in PHP (as the current mainstream development language) MyAdmin2.6 above because of the support of multi-language set, we use PHP (as the mainstream development language now) myadmin Management database, ...

  • 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.