MySQL Character set issues
The Web page All Utf-8,mysql installs is uses the UTF8, the webpage set up the mysql_query ("Set names UTF8");
But can not add Chinese data to MySQL, changed to mysql_query ("Set names GBK"); Yes, it's a bunch of garbled characters.
Is there any good way to do this without changing the way you encode it?
------Solution--------------------
Can not add the case is added after the blank? Database/table set to UTF8
------Solution--------------------
Change your php file to Utf-8, and then mysql_query ("Set names UTF8"); There should be no problem.
------Solution--------------------
It is best to change the program to change your program code to database encoding. This will not cause data errors!
------Solution--------------------
The My.ini in your MySQL.
respectively, in [Client][mysql] and [mysqld] three places below the
default-character-set=
Are you setting up UTF8, too?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.