The database cannot display Chinese characters, but the frontend can display the output information. why? After inserting Chinese characters, a bunch of garbled characters are displayed, but the data is output to the front-end, and the Chinese characters are displayed again. how can I solve the database garbled characters problem?
Reply to discussion (solution)
Previously, I encountered this problem in phpmyadmin.
It is because the utf8 format on phpmyadmin can be displayed in two different Chinese characters.
I don't know if you have this problem.
Where did you see the garbled code?
Modify the table encoding:
Alter table 'table name' default character set utf8 COLLATE utf8_bin
Modify the field encoding:
Alter table 'table name' CHANGE 'field name' CHAR (100) character set utf8 COLLATE utf8_bin NOT NULL
Enter the preceding two SQL statements in the database.
Where did you see the garbled code?
Chinese characters in the database are garbled
Set names latin1;