The problem is, rookie I inserted data on MySQL Workbench, and then use PHP to extract the data display, but the browser to see the Chinese garbled problem.
PHP is encoded on a notepad++ utf-8 without a BOM.
Then the charset of the database is this:
Tried in Set names Utf8,set,alter table name convert to character set UTF8, in the browser Chinese is displayed????, ask
Reply to discussion (solution)
After selecting a database, execute the setnames UTF8 directive
Assuming that you are using the MySQL extension, then
mysql_query (' Set names UTF8 ');
After selecting a database, execute the setnames UTF8 directive
Assuming that you are using the MySQL extension, then
mysql_query (' Set names UTF8 ');
Sorry, I do not seem to understand, where to plug in, how to plug all the wrong
I don't know, I shouldn't have put your code out.
I already said: After selecting the database
You have code similar to the following
Mysql_connect ();
mysql_select_db (' XXX ');
mysql_query (' Set names UTF8 '); Right here, set the working character set.
I don't know, I shouldn't have put your code out.
I already said: After selecting the database
You have code similar to the following
Mysql_connect ();
mysql_select_db (' XXX ');
mysql_query (' Set names UTF8 '); Right here, set the working character set.
Thank you moderator, every time you have a warm-hearted answer, has been successful, although do not know what the principle is, and heard to do so every time. That's a little bit of an egg ache.
What is the principle?
Very simple, I use Chinese, you use Japanese, we will not be able to communicate
Now I tell you: you ask a Chinese translation
So we can communicate.
The moderator's answer was so subtle that his profound questions were popularized, high
What is the principle?
Very simple, I use Chinese, you use Japanese, we will not be able to communicate
Now I tell you: you ask a Chinese translation
So we can communicate.