Home > CMS Tutorial > PHPCMS > What to do if Chinese garbled characters appear in phpcms

What to do if Chinese garbled characters appear in phpcms

angryTom
Release: 2020-02-19 14:55:02
Original
3005 people have browsed it

What to do if Chinese garbled characters appear in phpcms

What to do if Chinese garbled characters appear in phpcms

I learned to use phpcms to develop a file management module, but Chinese garbled characters appeared, and I struggled for a long time. The summary is as follows

1. Create a table on the mysql client. The default table encoding is latin1_swedish_ci. Although you can use the alter command to modify the encoding after it is built, it will cause many problems, especially garbled characters.

2. phpcms system installation module method, the default table encoding is gbk_general_ci.

Note the difference between 1 and 2. This can easily lead to garbled Chinese characters.

3. When writing code with the notepad editor, except for the sql database installation file, it is best to set everything else to Simplified Chinese. Otherwise, Chinese garbled characters will appear.

In short, the coding must be unified from the database to the web page source code.

Related recommendations: phpcms learning

The above is the detailed content of What to do if Chinese garbled characters appear in phpcms. 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