Get the App
SLTechnology News&Howtos  ›  Database  › 

What about the garbled Chinese characters exported by phpmyadmin?

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

This article mainly introduces the phpmyadmin export of Chinese characters garbled how to do, the article introduced in great detail, 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 Chinese characters (Chinese). So how to solve the garbled Chinese characters of phpmyadmin export data?

The solution to the garbled code of Chinese characters (Chinese)

The problem of garbled code of Chinese characters (Chinese) lies in the problem of coding.

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. Such a question mark, then you need to reset the language to the database format of the code 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.

At this point, the problem of Chinese garbled code in using PHPmyadmin has been solved.

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

Tags: Garbled data Chinese characters coding problems databases characters character sets language what to do content articles yes Chinese websites value interests only boys buddies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS MySQL Shulou Information Shulou Tech Info Linux