Chinese characters account for several bytes in computer utf8 coding.
Editor to share with you a few bytes of Chinese characters in the computer utf8 code, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.
In UTF-8 coding, one Chinese character is equal to three bytes, one Chinese punctuation mark is equal to three bytes, one English character is equal to one byte, one English punctuation mark is equal to one byte, and one numeric symbol is equal to one byte.
This article operating environment: windows10 system, DELL G3 computer.
In UTF-8 coding, one Chinese language is equal to three bytes, and Chinese punctuation accounts for three bytes.
An English character is equal to one byte, and English punctuation occupies one byte.
Unicode coding: one English is equal to two bytes, and one Chinese (including traditional Chinese) is equal to two bytes. Chinese punctuation accounts for two bytes and English punctuation.
Extended data:
UTF-8 uses 1x4 bytes to encode each character:
1. A US-ASCIl character needs only 1 byte encoding (Unicode range is U+0000~U+007F).
2. Latin, Greek, Cyrillic, Armenian, Hebrew, Arabic, Syriac and other letters with consonant symbols require 2-byte coding (Unicode range is U+0080~U+07FF).
3. Characters in other languages (including Chinese, Japanese and Korean characters, Southeast Asian characters, Middle Eastern characters, etc.) contain most commonly used characters and use 3-byte coding.
4. Other rarely used language characters use 4-byte encoding.
The above is all the contents of the article "Chinese characters account for a few bytes in computer utf8 coding". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!