When the character utf8 encoding exceeds three characters is inserted into the Mysql database, the error is rectified.

Source: Internet
Author: User

When the character utf8 encoding exceeds 3 bits, the error message is inserted into the Mysql database, and the Incorrect string value is resolved: '\ xF0 \ xA1 \ xBF \ xA8 \ xE9 \ x82... for column 'last _ name' this problem occurs in mysql. If mysql sets the encoding set to utf8, it can only support up to three bytes of UTF-8 encoding by default, the 4-byte UTF-8 character still exists, so if you create a table with utf8 Character Set exception is taken for granted. Before two text message backups, some special characters in the user's text message content will be encoded into four digits. The contacts imported from ios may also have such characters in lastname. The solution is simple. Modify the character set of a field or table to utf8mb4. Alter table fnbl_pim_contact_1 modify column 'last _ name' varchar (64) character set utf8mb4 COLLATE utf8mb4_unicode_ci NULL; note that, character Set utf8mb4 is supported after mysql 5.5.3 ...... The special characters in the text message below will be encoded into four digits.
 

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.