I would like to ask you a question about php + mysql character encoding. thank you for setting the website to UTF8. I have checked a lot of information and understood the truth, the page, program, and database characters are encoded in a unified manner. The reason is clear, and I don't know how to do it.
I can't control the MYSQL configuration of someone else who rents the website server space.
The dreamweaver5 is designed for the page. the default encoding is UTF-8. What else do I need to do?
Reply to discussion (solution)
The front-end character set has no direct relationship with the character set saved by the database. Again, MySQL database supports multiple types of character sets, as long as you choose the character set of the database as the UTF-8 when installing, then your data will be saved to the database according to the UTF-8.
The database is human, and you naturally cannot modify the settings.
What you can do is
1. add a connection to the Chinese field during table creation to verify gbk_chinese_ci or utf8_general_ci
Tell mysql which character set to store data
2. after connecting to the database, run the set names gbk or set names utf8 command.
Tell mysql which character set to use to communicate with him
How to add link verification for Chinese fields?