About the character encoding problem my database (mysql database software) uses utf8 and each table in it is also utf8 and the type of general_ci; & nbsp; my php editor uses the UTF-8 encoding method. The browser also uses the UTF-8 encoding method. after operations on the webpage, the browser submits the code to the database through php, the data in the database becomes garbled "& #229; & #189; & #177; & #23 about character encoding
My database (mysql database software) uses utf8 and each table in it is also utf8 and the type of general_ci;
My php editor uses UTF-8 encoding;
The browser also uses UTF-8;
After the operation on the web page is submitted to the database through php, the data in the database becomes garbled "å ½ ± §? Å ¨ ±ä¹ "(similar to this garbled code)
In addition, inputting normal encoding data in the database is also garbled when it is displayed in the browser.
I don't know what the problem is. At first I had a problem with the thinkphp template, but I connected the database and operated it with the original (self-written, there is still a garbled problem...
I really don't know why ..
Please give advice
------ Solution --------------------
Set names 'utf8'; is execution performed?
------ Solution --------------------
Set names 'utf8 ';
------ Solution --------------------
It should be a problem with the TP framework...
To pick up points...
------ Solution --------------------
I don't know what's going on with you, but I have never encountered any problems using the following methods:
1. set the character set of the database to utf8
2. when connecting to the database, use mysql_set_charset ('utf8') or set the character set during connection.
3. set the text character set of the editor to utf8.
4. set the http header content-type = text/html; charset = utf-8
Hope to help you