For beginners, it is very simple to ask the following questions about Chinese garbled characters. Cainiao inserts data on mysql workbench and uses php to extract and display data, however, Chinese characters are garbled in the browser.
Php uses UTF-8 on notepad ++ without BOM encoding.
Then the charset of the database is as follows:
I tried to set names utf8, set, alter table name convert to character set utf8. all Chinese characters in the browser are displayed ????, Question
Reply to discussion (solution)
Select the database and run the SETNAMES utf8 command.
If you are using mysql extension
Mysql_query ('set names utf8 ');
Select the database and run the SETNAMES utf8 command.
If you are using mysql extension
Mysql_query ('set names utf8 ');
Sorry, I don't seem to quite familiar with it. how can this problem be inserted?
Don't post your code if you don't understand it.
I already said: After selecting a database
You have the following code:
Mysql_connect ();
Mysql_select_db ('XXX ');
Mysql_query ('set names utf8'); // set the working character set here
Don't post your code if you don't understand it.
I already said: After selecting a database
You have the following code:
Mysql_connect ();
Mysql_select_db ('XXX ');
Mysql_query ('set names utf8'); // set the working character set here
Thanks to the moderator, you have been enthusiastic about the answer every time. although I don't know what the principle is, I have to say that I have to do this every time .. This is a little painful.
What is the principle?
It's easy. I use Chinese and you use Japanese, so we cannot communicate.
Now I will tell you: please translate Chinese
In this way, we can communicate with each other.
The answer of the moderator is really subtle. his profound questions are common and high.
What is the principle?
It's easy. I use Chinese and you use Japanese, so we cannot communicate.
Now I will tell you: please translate Chinese
In this way, we can communicate with each other.