How to deal with the five-bit utf encoding in the Chinese language obtained by Mysql?
Source: Internet
Author: User
What should I do if Mysql uses 5-bit utf encoding in Chinese? Using php to retrieve mysql values, we can see on the webpage that Chinese is a 5-bit utf8 code, not a Chinese text. what is the problem? Mysql runs show & nbsp; variables & nbsp; like & nbsp; '% char %'. The result is as follows: what should I do if the Chinese character obtained by character_s Mysql is 5-bit utf encoding?
Use php to obtain the mysql value. on the webpage, the Chinese character is UTF-8 encoded, not a Chinese character.
What is going on?
Mysql runs show variables like '% char %'. The result is as follows:
Character_set_clientutf8
Character_set_connectionutf8
Character_set_databaseutf8
Character_set_filesystembinary
Character_set_resultsutf8
Character_set_serverutf8
Character_set_systemutf8
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