What is GBK encoding and UTF-8 encoding? What's the difference between a UTF-8 version and a GBK version?

Source: Internet
Author: User
Tags character set

The GBK version of the common build program is the same as the UTF-8 version feature. It's just different coding methods.

GBK's text encoding is expressed in two-byte notation, that is, both Chinese and English characters use double-byte notation, except that the highest bits are set to 1 for distinguishing Chinese.

As for the UTF-8 encoding is a multi-byte encoding used to solve the international character, it uses 8 bits (that is, one byte) in English, and the Chinese uses 24 bits (three bytes) to encode. For more English characters, the site uses UTF-8 to save space.

GBK contains all Chinese characters; UTF-8 contains the characters that all countries in the world need to use.

GBK is the standard of GB2312 compatible GB2312 on the basis of national standard, UTF-8 encoded text can be displayed in various countries to support the UTF-8 character set browser.

For example, if it is UTF-8 code, the foreigner in English IE can also display Chinese, and do not need them to download IE Chinese Language support package. Therefore, for the English more forums, using GBK each character occupies 2 bytes, and the use of UTF-8 English is only one byte.

Tip: If the site is primarily for domestic users, it is recommended that you use the GBK version because it saves space.

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.