UTF-8 and GBK encoding which is good?

Source: Internet
Author: User

Someone often asks which code is better for UTF-8 and GBK on the webpage.

Based on individual needs

GBK encoding is specifically used to solve Chinese encoding, Which is dual-byte. Both Chinese and English are dubyte.

UTF-8 is an international multi-byte encoding. For English, 8-bit one byte, Chinese uses 24-bit three bytes.

In addition, if a foreigner accesses your GBK webpage, You need to download Chinese Language Pack support. This problem does not appear when you access a Web page with UTF-8 code.

Question. Direct access.

Obviously, if you are mainly engaged in ChineseProgramDevelopment. If the customer is mainly Chinese, then use GBK, because the Chinese use of UTF-8 Encoding

Three bytes. GBK is used to save space.

If you are developing an English website, use UTF-8 because UTF-8 occupies only one byte in Chinese and English. GBK is two bytes in both Chinese and English, and the country

When you access GBK, You need to download the Language Pack.

If your website is Chinese, but there are many foreign users, it is best to use UTF-8.

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.