Home  >  Article  >  Database  >  How to solve the problem of garbled Chinese characters exported by phpmyadmin?

How to solve the problem of garbled Chinese characters exported by phpmyadmin?

青灯夜游
青灯夜游Original
2020-04-20 17:13:262537browse

When using phpMyAdmin to import and export the mysql database, the problem of garbled Chinese characters (Chinese) appears. So how to solve the problem of garbled Chinese characters in the data exported by phpmyadmin? The following article will introduce the solution to you, I hope it will be helpful to you.

How to solve the problem of garbled Chinese characters exported by phpmyadmin?

Solution to garbled Chinese characters (Chinese)

The problem with garbled Chinese characters (Chinese) is On the issue of encoding.

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

Because the default character set of phpmyadmin is latin1_swedish_ci.

It is different from the commonly used gb2312, gbk, utf8, so if the character set is not modified, garbled characters will appear.

Therefore, when exporting the database, pay attention to encoding issues.

Because the commonly used character set is gbk_chinese_ci, we will take gbk_chinese_ci as an example to illustrate how to deal with the problem of Chinese garbled characters.

First of all, when exporting data, check whether the Chinese in the records in the data table can be displayed normally. If the Chinese displayed are all question marks like ???, then you have to reset the language to what you want. The encoding database format used, for example, the encoding of the

database is gbk_chinese_ci and the database engine is MyISAM, then the Language of phpMyAdmin must be set to Chinese simplified (zh-utf-8), not Chinese simplified (zh-gb2312-utf-8).

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

Only if the language is selected correctly, Chinese garbled characters will not appear when we export SQL.

So far, the problem of Chinese garbled characters when using PHPmyadmin has been solved.

Related tutorial recommendations: "phpMyAdmin Tutorial"

The above is the detailed content of How to solve the problem of garbled Chinese characters exported by phpmyadmin?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:What can phpmyadmin do?Next article:What can phpmyadmin do?