GBK is compatible with the gb2312 standard after expansion based on the National Standard gb2312 (it does not seem to be a national standard ). GBK encoding is specifically used to solve Chinese encoding, Which is dual-byte. Both Chinese and English are dubyte.
UTF-8 encoding is a multi-byte encoding for international characters. It uses 8 bits (one byte) for English and 24 bits (three bits) for Chinese characters. For forums with many English characters, use a UTF-8 to save space. In addition, if a foreigner accesses your GBK webpage, You need to download Chinese Language Pack support. This problem does not occur when you access a Web page with UTF-8 code. Direct access.
GBK contains all Chinese characters; UTF-8 contains all the characters needed by all countries around the world.
Some people often ask the website to write UTF-8 and GBK which code is good, according to personal needs, if you mainly do Chinese program development, the customer is also mainly Chinese, then use GBK, because the Chinese character of UTF-8 encoding uses three bytes, using GBK saves space.
If you are developing an English website, use UTF-8, because UTF-8 occupies only one byte in both Chinese and English. GBK is two bytes in both Chinese and English, and foreign customers need to download the Language Pack when accessing GBK.
If your website is Chinese, but there are many foreign users, it is best to use UTF-8.
UTF-8-encoded text can be displayed on various browsers that support utf8 character sets.
For example, if it is UTF-8 encoded, Chinese characters can also be displayed on Internet Explorer of foreigners, without the need to download the Chinese language support package for Internet Explorer. Therefore, for more English forums, use GBK each character occupies 2 bytes, while use UTF-8 English only occupies 1 byte.
Utf8 is an international code, and its versatility is better. Foreigners can also visit the Forum. GBK is a national code and its versatility is worse than utf8, but the database occupied by utf8 is larger than GBK ~
What is the difference between UTF-8 and GBK? Which one is better?