Mysql encoding: utf8, gbk have tried. mysql font and command line display are correct.
Questions added:
Garbled
???: 15
???: 25
??: 32
These few lines, the value of the database tutorial is Chinese characters. The question mark is displayed.
Solution:
In $ rs = mysql_db_query ("lib", "select * from mytb", $ conn);
Plus in front
mysql_query ("set names gb2312"); or mysql_query ("set names gbk");
Now look at the solution to the problem of garbled
.gb2312, gbk, utf8 and other support multi-byte encoding character sets can store Chinese characters, the number of characters in gb2312 much less than gbk, and gb2312, gbk, etc. can be encoded under utf8.
Use the command show variables like 'character_set_%'; View the current character set settings:
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.