PhpMyAdmin: Check whether Chinese characters in the latin1 encoded table are garbled.

Source: Internet
Author: User
Mysql tables are latin1 encoded by default. Like phpbb, although the table is latin1 encoded, the content is generally inserted in gb2312 encoding. You can view the garbled characters directly in the phpmyadmin language: Chinese-Chinesesimplified.

Mysql tables are latin1 encoded by default. Like phpbb, although the table is latin1 encoded, the content is generally inserted in gb2312 encoding. You can view the garbled characters in the language: Chinese-Chinese simplified of phpmyadmin.

It seems nothing to do with garbled text. sometimes it is troublesome to modify it directly. I don't know if there are other better methods. you can modify the configuration to display it normally.
Take phpMyAdmin-2.11.9.5 as an example.
Open libraries/select_lang.lib.php to find PMA_langList (). an array is returned, and the encoding in the array is followed by UTF-8. Regardless of the encoding, phpmyadmin uses UTF-8 encoding to output content to the page. Now we need to add a gb2312 encoding and add it at the end of the array.

'Zh-gb2312-utf-8 '=> array ('zh | chinese simplified latin1', 'Chinese _ simplified-gb2312 ', 'zh', 'China '),

Then, change the mysql character set output from gb2312 to latin1 and search for $ GLOBALS ['MySQL _ charset_map '].
Set 'gb2312' => 'gb2312 ',
Change to 'gb2312' => 'latin1 ',

Open phpmyadmin again. Select Chinese language-Chinese simplified latin1

The mysql character set is latin1.

Go to the data table and check the data table. the normal Chinese characters are displayed.

To view other encoded tables, you must change the language from Chinese to Chinese simplified.


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.