Home  >  Article  >  The relationship between unicode and utf8

The relationship between unicode and utf8

藏色散人
藏色散人Original
2020-02-18 11:15:102864browse

The relationship between unicode and utf8

The relationship between unicode and utf8

Unicode is an encoding table, for example, specifying a code for a Chinese character. Similar to GB2312-1980, GB18030, etc., but with different character sets.

A unicode code may be converted into a UTF8 code with a length of one BYTE, or two, three, or four BYTE, depending on the value of the unicode code. Because the value of English unicode code is less than 0x80, it only needs to be transmitted in UTF8 of one BYTE, which is faster than sending two BYTEs of unicode.

UTF8 is just a "re-encoding" method devised to transmit unicode.

UTF8 to unicode can be reverse calculated using the program I gave above.

For more programming related content, please pay attention to the Programming Introduction column on the php Chinese website!

The above is the detailed content of The relationship between unicode and utf8. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn