Issue 1 The computer can only process numbers, and to process text, convert the text first to a number
The result ASCII code appears, its function is to correspond the text with the number, the ASCII code takes one byte as the unit
Question 2 acsii code can only correspond to English case, number and some symbols, what about the language of other countries?
As a result, various countries have developed different codes, such as our GB2312
3 national standards are different, when used together will conflict, garbled
The result is Unicode encoding, Unicode unifying all languages and unifying them into a set of encodings, Unicode in two-byte units
Question 4 Unicode is convenient, but if a text is basically in English, using Unicode will take up unnecessary memory, not saving, transmission is not convenient
The result is UTF-8 encoding, called variable length encoding, which is stored in bytes of different lengths depending on the character.
This perfectly solves the problem of character storage!
Let's talk about how character encoding works on your computer:
In general, use UTF-8 encoding in memory to convert to Unicode encoding when used (such as a notepad editing text)
Unicode encoding in the server when browsing a Web page, UTF-8 encoded at transfer time
Development and use of character encoding