GBK Encoding and UTF-8 coding

Source: Internet
Author: User

Reprinted from: http://blog.sina.com.cn/zq0354

GBK text encoding is a double-byte representation, that is, both Chinese and English characters are represented by double-byte, but in order to distinguish English, the highest bit is set to 1.
UTF-8 encoding is a multi-byte encoding used to solve international characters, which uses 8 bits (or one byte) in English and is encoded in Chinese using 24 bits (three bytes). For forums with more English characters, you can save space with UTF-8.

Perhaps you can not understand the above, simply say GBK is the Chinese character set, installed in Chinese GBK encoded computer normal display Chinese, and if the foreign non-Chinese operating system on the computer will be displayed garbled, so GBK mainly for domestic website use.
and UTF8 is international standard, if in foreign non-Chinese operating system, also can display Chinese correctly.

There is a database size problem, because GBK with double-byte to represent, and UTF8 Chinese to use three bytes to represent, so UTF8 database will be larger than GBK.

You know the above knowledge should be able to know what your website is suitable for the code.
For example, the content of a lot of sites, mainly for domestic visits that can use GBK encoding.
While less content sites, corporate sites, etc., it is recommended to use UTF8 encoding,
and UTF8 and GBK can convert each other.

GBK Encoding and UTF-8 coding

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.