1 Modified the encoding of the database.
2 The file encoding is changed to utf8
3 The charset of html = utf8
But it still doesn’t work. There are still garbled characters in many places and I don’t know what I missed.
ps.
React native may be used later. Is it incompatible with gbk?
1 Modified the encoding of the database.
2 The file encoding is changed to utf8
3 The charset of html = utf8
But it still doesn’t work. There are still garbled characters in many places and I don’t know what I missed.
ps.
React native may be used later. Is it incompatible with gbk?
Modified the database encoding <- This is too powerful
Modifying the database encoding will inevitably cause garbled characters. You should first export it to a sql file, then create a new utf8 database, and then import the data. Before importing, check whether there is a definition of charset in the exported sql file. If so, it needs to be replaced with utf8.
In addition, set names utf8 must be executed immediately after PHP connects to the database.
The database also needs to be modified.
Database character set
Database character set
Connection character set, proofreading character set, transmission character set, header, character set used by database to store data