[Conversion] a Chinese character of UTF-8 occupies three bytes of length and UTF-8 bytes.
The answer from Baidu is more vivid and impressive, so I will take a note.
Original link https://zhidao.baidu.com/question/1047887004693001899.html
Zhi Hu also
In the past two days, I took the time to summarize/sort out the actual encoding methods and usage of various encodings in Java applications. I will record them here for future reference. In order to form a complete understanding and in-depth
In A. SQL file that contains Chinese characters, we can see that it is UTF-8 encoded in the Eclipse attribute, as shown in the following figure,However, when you view this file on the Windows console (for convenience, I copied the file to the
1. ASCII
ASCII (American Standard Code for information interchange, US Information Interchange Standard)CodeIs a computer coding system based on Latin letters. It is mainly used to display modern English and other Western European languages. It is
ASCIIThe ASCII code is a 7-bit code with the encoding range of 0x00-0x7f. The ASCII character set includes English letters, Arabic numerals, punctuation marks, and other characters. 0x00-0x20 and 0x7f contain 33 control characters.The system that
Is json data garbled in non-UTF-8 encoding? Authority said that json data in non-UTF-8 encoding will be garbled? Authority
Reply to discussion (solution)
It won't be the same as the encoding of your file.
Therefore, the json_encode ()
Is used to output Chinese characters in GD. When the content to be output contains Spanish characters, confusion may occur. Later, I found the modified code and solved the problem. ">
First, this is a UNICODE to UTF-8 encoding conversion function,
The function for GD to output Chinese characters is analyzed early, and a comparison table (gb2312.txt) with a Gbit to unicodeis found, which is used to output Chinese characters in GD. When the content to be output contains Spanish characters,
Early on, I found a reference table (gb2312.txt) for converting Gbit/s to 8 Gbit/s, and used it to output Chinese Characters in GD. When the content to be output contains Spanish characters, confusion may occur. Later I found the modified
Code .
Chinese characters in DOS are garbled. today, I am going to operate mysql databases in DOS. Chinese characters garbled during data insertion into tables. Both my database and table are in utf8 format.
My mysql is prepared in advance in the text, in
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.