The difference between UTF-8 encoding and GBK coding

Source: Internet
Author: User
Tags character set contains log mongodb mysql postgresql redis firewall


First, separating from the byte



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.



UTF-8 encoding is a multi-byte encoding used to solve international characters, which uses 8 bits (that is, one byte) in English and uses 24 bits (three bytes) in Chinese to encode. More forums for English characters use UTF-8 to save space.



Second, on the character distinction



GBK contains all Chinese characters;



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



Third, coding on the distinction between



GBK is the standard of compatible GB2312 after GB2312 on the basis of national standard (as if it is not national standard)



UTF-8 encoded text can be displayed in various countries that support the UTF8 character set browser.



For example, if it is UTF8 code, it can also display Chinese on foreigners ' English ie, without the need for them to download IE's 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.



Fourth, use on the distinction



GBK is China's national code, versatility than UTF8, but UTF8 occupy a larger database than GBK, and is generally do the forum dz These procedures, corresponding components and plug-ins to support GBK corresponding development of a more comprehensive point, and then more convenient when DIY.



UTF8 is an international code, its versatility is better, foreigners can also browse the forum, and Chinese can be directly identified, if your forum to do more internationalization that must be used UTF8.



Add: UTF8 more traditional support than GBK have the advantage drop.



For DZ Forum, a lot of plug-ins are only supported GBK, if you need to install more Plug-ins forum or use GBK better, and to install fewer plug-ins and have a special user group forum with UTF8 better.



Therefore, if you do the forum is only a specific domestic circle in the use of GBK simple point, the basic plug-ins can be installed, but if your station has foreign market needs on the proposal UTF8,




Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

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.