Home > Database > phpMyAdmin > body text

What should I do if Chinese garbled characters appear in phpmyadmin?

coldplay.xixi
Release: 2020-07-20 11:34:45
Original
3633 people have browsed it

The solution to Chinese garbled characters in phpmyadmin: first find ['zh-gb2312'] and change it to ['zh-gb2312-utf-8']; then find ['gb2312' => 'gb2312'] Change to ['gb2312' => 'latin1]; finally save it.

What should I do if Chinese garbled characters appear in phpmyadmin?

Solution to Chinese garbled characters in phpmyadmin:

Go to the root directory of phpMyAdmin and open the following file:

libraries/select_lang.lib.php
 
1. Find the line with "zh-gb2312",

Change

'zh-gb2312'
Copy after login

to

'zh-gb2312-utf-8'
Copy after login

Why add it like this? That's because the server will filter out languages ​​without "-utf-8". In libraries/database_interface.lib.php line 168, according to English: "To prevent confusion", or if you don't change 'zh-gb2312' It becomes 'zh-gb2312-utf-8', you can remove the filtering. Just remove that if and it will be OK.

2. Find the line "$mysql_charset_map = array("Change

'gb2312' => 'gb2312',
Copy after login

to

 'gb2312' => 'latin1',
Copy after login
and save it, OK , after entering the phpMyAdmin management, select the language chinese simplified(zh-gb2312-utf-8)

Remember to select the language as
chinese simplified(zh-gb2312-utf-8)

Related tutorial recommendations:

phpmyadmin

The above is the detailed content of What should I do if Chinese garbled characters appear in phpmyadmin?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template