Many projects use latin1 encoding to store Chinese data because engineers are not rigorous or have insufficient levels to choose wrong database encoding during initial construction. As the complexity of the project increases, various coding problems
Because of the project environment, ibatis is used in Java projects, while ibatis already has an aiscii (iso8859) Data Source. Therefore, MySQL databases must use Latin1 encoding, the mysql client library also uses Latin1 encoding. Normally, the
To sum up the problem of MYSQL encoding conversion latin1 to utf8 bitsCN.com
Black noodle
Yesterday I met a PHP website where the database was MYSQL5.1. after The phpmyadmin management of the website, I found that all Chinese characters in the table
Beginners are often confused. Does mysql's default Character Set latin1 support Chinese? Preliminary analysis shows that, yes, Chinese is indeed supported! (Is a preliminary conclusion, only a preliminary analysis) 1. first take a look at latin1
Black noodle
Yesterday I met a PHP website where the database was MYSQL5.1. After the phpmyadmin management of the website, I found that all Chinese characters in the table were garbled. After export, the local import was garbled, you cannot view
At first, the following phenomena were found:mysql> show variables like ' character% '; +--------------------------+------------------- --------------------+| variable_name | Value |+ --------------------
First post:Original address:Linux server under File name my.cnfWindows under File name My.iniproblem: When adding Chinese data to the database through the SQL language, the query is garbled. Cause: The original installation database is the default
Php,ajax,mysql,latin1 Coding Problems
MySQL default latin1 encoding, read the data with Ajax read garbled, in the server side of the ajax.php, there are two places involved in the code:
A.header (' Content-type:text/xml;charset=utf-8 ');
B. When
Convert MYSQL databases that contain UTF8 and latin1 encoding. if someone asks me today, I just turn it around. it's very simple. here I will explain it.
Using phpmyadmin to import data to test, we found that the database contains UTF8 and latin1
The garbled text is converted into Chinese characters by the PHP and MYSQL databases !! Encoding: utf8, latin1 !! The garbled text is converted into Chinese characters by the PHP and MYSQL databases !! UTF-8, latin1 !!, $ Str = 'kubelogy'; echoiconv
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.