Get the App
SLTechnology News&Howtos  ›  Database  › 

What about Chinese garbled codes exported by phpmyadmin

Shulou Source: shulou.com Published: 2022-06-01 00:18:00 10月03日 Update

This article mainly introduces phpmyadmin export Chinese garbled code how to do, the article is very detailed, has a certain reference value, interested friends must read it!

When using PHPmyadmin to import and export mysql database, there is a problem of garbled code in Chinese.

The following describes the solutions when you encounter Chinese garbled codes:

The character set codes used by Chinese websites are generally gb2312,gbk,utf8.

Because the default character set of phpmyadmin is latin1_swedish_ci.

It is different from the commonly used gb2312,gbk,utf8, so if you do not modify the character set, there will be garbled.

Therefore, when exporting the database, you should pay attention to the coding problem.

Because the frequently used character set is gbk_chinese_ci, so take gbk_chinese_ci as an example to illustrate how to deal with the problem of Chinese garbled.

First of all, when exporting the data, check to see if the Chinese in the records in the data table can be displayed properly. With such a question mark, you need to reset the language to the database format of the encoding you use, such as:

The database is encoded as gbk_chinese_ci and the database engine is MyISAM, so the Language (language) of phpMyAdmin must be set to Chinese simplified (zh-utf-8) instead of Chinese simplified (zh-gb2312-utf-8).

Similarly, if your data encoding is gb2312_chinese_ci, then Language must be set to Chinese simplified (zh-gb2312-utf-8), not Chinese simplified (zh-utf-8).

Only if we choose the right language, we will not have Chinese garbled when we export sql.

The above is all the contents of the article "how to export Chinese garbled codes in phpmyadmin". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Chinese data garbled database code character set language question how to do content article right Chinese website value interest only guys buddies commonly used Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Linux Shulou Tech Info vpn Apple