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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function