In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how many bytes a Chinese character is in php. I hope you will gain something after reading this article. Let's discuss it together.
For Chinese characters in php, if GBK and Big-5 versions are used, each Chinese character is equivalent to 2 bytes; if UTF-8 version is used, each Chinese character is equivalent to 3 bytes.
This article operating environment: Windows7 system, PHP7.4 version, Dell G3 computer.
A:
For Chinese characters, if GBK and Big-5 versions are used, each Chinese character is equivalent to 2 bytes
With the UTF-8 version, each Chinese character is equivalent to 3 bytes.
Bytes are units of binary data. A byte is usually 8 bits long. However, some older computer structures use different lengths. In order to avoid confusion, words are used instead of byte in most international literature. In most computer systems, a byte is an 8-bit long unit of data, and most computers use a byte to represent a character, number, or other character. A byte can also represent a series of binary bits. In some computer systems, four bytes represent a word, which is the unit in which the computer can effectively process data when executing instructions. Some language descriptions require two bytes to represent a character, which is called a double-byte character set. Some processors can handle double-byte or single-byte instructions. Bytes are usually abbreviated to "B", while bits are usually abbreviated to lowercase "b", and the size of computer memory is usually represented by bytes.
After reading this article, I believe you have a certain understanding of "how many bytes is a Chinese character in php". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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
© 2024 shulou.com SLNews company. All rights reserved.