Those things about MySQL (4) Selection of building table coding

Source: Internet
Author: User

MySQL build database or build a table will encounter the problem of choice coding, we used to be a habitual choice utf8, but in MySQL after 5.5.3 version with UTF8MB4 encoding, UTF8MB4 can save 4 bytes Unicode,mb4 is most bytes 4 of the meaning. Including emoji expressions and a lot of infrequently used Chinese characters can be stored, but also can store any new Unicode characters, extensibility good ah.

The maximum character length of the UTF8 encoding is 3 bytes, and if it encounters a 4-byte paragraph, it will be a moth.

Also, UTF8MB4 is a superset of UTF8, except that it does not require other conversions to change the encoding to UTF8MB4.

Of course, you have to be frugal, then continue to use UTF8 Bar, save space.

So the conclusion is: MySQL build database to build table please use UTF8MB4.

Ps:emoji Emoticons are a special Unicode encoding that is used on IOS and Android phones and mobile devices.

Those things about MySQL (4) Selection of building table coding

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.