Questions about character sets: phpmyadmin and ipad are garbled
Source: Internet
Author: User
Character Set: phpmyadmin and ipad display are garbled characters. I created a database in the mysql management tool phpmyadmin, which contains a text field. after the database is built, I found that its attributes are: latin1_swedish_ci. is this about character sets? Then, the question about character set: phpmyadmin and ipad display are garbled characters.
In the mysql management tool phpmyadmin, I created a database with a text field. after the database is built, I found that its attribute is latin1_swedish_ci. Is this a character set?
Then I created a php file, in which the form can be used to write data to the database. after the file is written, I can view it in phpmyadmin. it is all garbled characters (Chinese characters are garbled and English letters are normal). However, in the program, read it out, but it is displayed normally, and Chinese characters can be displayed normally.
But I opened it on the ipad and it showed garbled characters.
How can I make it display normally in phpmyadmin? And the display on the ipad is normal? That is to say, how can we unify the php character set and the character set of fields in the database? What should I change this "latin1_swedish_ci" attribute? Share:
------ Solution --------------------
This is generally set to prevent garbled characters.
Database character type utf8
Utf8 utf8_unicode_ci
Use utf8 for PHP files
Mysql operation class setting utf8
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service