Joke Collection Website - Public benefit messages - How many characters does a space take?
How many characters does a space take?
A space usually takes up 2 characters, but in some special cases it takes up 3 characters.
In the program, the number of characters occupied by spaces depends on the character set used by the program, such as:
1. When using multi-byte character sets, half-width spaces occupy 1 byte. , a full-width space takes up 2 bytes.
2. When using the Unicode character set, half-width spaces occupy 2 bytes, and full-width spaces occupy 2 bytes.
In the file, the number of characters occupied by spaces depends on the encoding used when saving the file, such as:
1. When saving files in ANSI encoding, half-width spaces occupy 1 character. section, full-width spaces occupy 2 bytes.
2. When saving as a UTF8-encoded file, half-width spaces occupy 1 byte, and full-width spaces occupy 3 bytes.
3. When saving as a Unicode-encoded file, half-width spaces occupy 2 bytes, and full-width spaces occupy 2 bytes.
Extended information
ASCII code: One English letter (regardless of upper and lower case) occupies one byte of space. A binary number sequence, used as a digital unit in a computer, is generally an 8-bit binary number, converted to decimal. The minimum value is -128 and the maximum value is 127. For example, an ASCII code is a byte.
UTF-8 encoding: One English character is equal to one byte, and one Chinese character (including traditional Chinese) is equal to three bytes. Chinese punctuation occupies three bytes, and English punctuation occupies one byte
Unicode encoding: one English is equal to two bytes, and one Chinese (including traditional Chinese) is equal to two bytes. Chinese punctuation occupies two bytes, and English punctuation occupies two bytes
Baidu Encyclopedia - Characters
- Previous article:Can I exchange points for traffic when sending SMS to 10086?
- Next article:Is it true that the lucky money bag is borrowed?
- Related articles
- The evolution of communication methods from ancient China to modern times
- Where is Anhui Civil Affairs Information Center?
- Where are the audio messages received by Apple's mobile phone stored?
- The Bank of China sent a text message saying that it would be frozen for 72 hours. Why hasn't it been unsealed when the time is up?
- How does Li translate English into Chinese by sending messages on his mobile phone?
- What about the message that annoys your husband and coaxes him?
- Magnetic field sensor setting of Nubian mobile phone
- Thanksgiving greetings on Double Ninth Festival
- What does Tong Yuan Express mean "has arrived at Mama Station"? Should I pick it up or wait for him to deliver it?
- How to use online courses to test students' words