In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Today, I will talk to you about the number of characters in a space, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
A space usually occupies 2 characters, but in some special cases it takes 3 characters.
In a program, the number of characters occupied by spaces depends on the character set used by the program, such as:
1. When using a multi-byte character set, half-width spaces occupy 1 byte and full-width spaces occupy 2 bytes.
2. When using the Unicode character set, the half-width space occupies 2 bytes, and the full-width space occupies 2 bytes.
In a file, the number of characters occupied by spaces depends on the encoding used to save the file, such as:
1. When saving to an ANSI-encoded file, half-width spaces occupy 1 byte, and full-width spaces occupy 2 bytes.
2. When saving to a UTF8-encoded file, half-width space takes up 1 byte, and full-width space occupies 3 bytes.
3. When saving to a Unicode-encoded file, the half-width space takes up 2 bytes and the full-width space occupies 2 bytes.
Extended data:
ASCII code: an English letter (regardless of case) takes up a byte of space. A sequence of binary numbers, in a computer, as a digital unit, usually 8-bit binary numbers, 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. Three bytes of Chinese punctuation and one byte of English punctuation
Unicode coding: one English is equal to two bytes, and one Chinese (including traditional Chinese) is equal to two bytes. Two bytes of Chinese punctuation and two bytes of English punctuation
After reading the above, do you have any further understanding of how many characters a space occupies? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
File name: checkbox.htmlCheckbox Checkbox < / h4 >
© 2024 shulou.com SLNews company. All rights reserved.