Character encoding
The combination of text, graphics, punctuation, and numbers in a set is called a character set.
These character sets are encoded according to the rules, and different character encodings are formed.
Such as
You enlarge the disc with a microscope, you will see the uneven surface of the platter, the convex place is magnetized, the concave place is not magnetized; The raised place represents the number 1, the concave place represents the number 0. The hard disk can only use 0 and a to represent all text, pictures and other information. So how is the letter "A" stored on the hard disk? Perhaps the small computer stores the letter "A" is 1100001, while Xiao Wang stores the letter "A" is 11000010, so the two sides exchange information will be misunderstood. For example, Xiao Zhang 1100001 sent to Xiao Wang, Xiao Wang does not think 1100001 is the letter "A", may think this is the letter "x", so Xiao Wang in Notepad to access the storage on the hard disk 1100001, on the screen is the letter "X". In other words, Xiao Zhang and Xiao Wang used different coding tables.
Character encoding classification
1. ASCII
The ASCII full name is American standard code for Information Interchange (U.S. Information Interchange standards codes).
Read as ' Ah-si ', always thought that II is the Roman numeral, originally is information interchange abbreviation.
The standard ASCII code is also called the base ASCII code, using a 7-bit binary number to represent all uppercase and lowercase letters, numbers 0 through 9, punctuation marks, and special control characters used in American English, while the 8th bit is used to control parity
Parity check: is a method of verifying the correctness of the code transmission. The number of "1" in the digits of a given set of binary codes is either odd or even to be verified. The odd parity is called parity, and vice versa, called even parity. What kind of calibration is prescribed beforehand?
A parity bit is usually set specifically so that the number of "1" in this set of code is odd or even. With odd check, when the receiver receives this set of code, the number of checks "1" is odd, thus determining the correctness of the transmission code.
ASCII can only be used in the United States, other countries in order to meet the needs of native language, ASCII code has been extended. Cancels the parity bit and changes it to 256 characters.
2. ANSI
ANSI This character code represents different character encodings in different speech environments of the Windows operating system
Under the Simplified Chinese system, ANSI encoding stands for GB2312 encoding, in Japanese operating system, ANSI code represents JIS code
3. The difference between GB2312, GBK and GB18030
(1) GB2312
When the Chinese people get the computer, there is no available byte state to represent Chinese characters, and there are more than 6,000 commonly used Chinese characters need to be preserved, and then think of those ASCII code in the 127th after the singular symbols are directly canceled, the rule: a character less than 127 is the same meaning as the original, However, when two characters greater than 127 connect prompt together, it represents a Chinese character, and a byte in front (called a high byte) is used from 0xa1 to 0xf7, followed by a byte (low byte) from 0xa1 to 0xFE, so that we can assemble about 7,000 more simplified Chinese characters. In these codes, we also put mathematical symbols, Roman Greek alphabet, Japanese kana have been compiled into, even in ASCII, the number, punctuation, letters are all re-compiled two bytes long code, this is often said "full-width" character, and the original under 127th is called "Half-width" character. This scheme of Chinese characters is called "GB2312". GB2312 is a Chinese extension to ASCII. Compatible with ASCII.
(2) GBK
But Chinese characters are too many, we soon found that there are many people's names there is no way to play here, have to continue to GB2312 not used to find the code point to use. Later still not enough, so simply no longer require that the low byte must be 127th after the inner code, as long as the first byte is greater than 127 fixed indicates that this is the beginning of a Chinese character, whether followed by the expansion of the character set in the content. The result of the expanded encoding scheme is called the "GBK" standard, and GBK includes all the contents of the GB2312, while adding nearly 20,000 new Chinese characters (including traditional characters) and symbols.
(3) GB18030
Later, the minority also to use the computer, so we expanded, and added thousands of new minority characters, GBK expanded into a GB18030. Since then, the Chinese nation's culture can be passed on in the computer age.
Chinese handlers see this series of Chinese character coding standards as good, so they are called "DBCS" (Double byte Charecter set DWORD character set). In the DBCS series of standards, the biggest feature is the two-byte long Chinese characters and one-byte long English characters coexist in the same set of coding scheme, so they write the program in order to support the Chinese processing, must pay attention to the string of each byte value, if this value is greater than 127, Then it is assumed that a character in a double-byte character set appears. In this case, "a Chinese character counts two English characters!" "。 However, this is not always the case in the Unicode environment.
4, ISO-8859
ISO-8859 Full NameISO/IEC 8859Is the standard of a series of 8-bit character sets developed jointly by the International Organization for Standardization (ISO) and IEC, which now defines 15 character sets
Standard
ASCII contains spaces and 94 "printable characters" that are sufficient for use in English. However, other languages that use the Latin alphabet (mainly European languages) have a certain number of additional symbolic letters, so they can be stored and represented using areas other than ASCII and control characters. In addition to languages using the Latin alphabet, this form can be used to store and represent the Cyrillic alphabet in Eastern European languages, Greek, Thai, modern Arabic, Hebrew, and so on. coded separately by country/region. ISO successive languages) expanded ASCII developed more than 10 applicable to different countries and regions (both Latin character sets (1 of the 8-bit code), called ISO8859, also known as the extended ASCII character setCharacter SetISO/IEC 8859-1 (Latin-1)-Western European language ISO/IEC 8859-2 (LATIN-2)-Central European ISO/IEC 8859-3 (Latin-3)-Southern European language. Esperanto can also be displayed with this character set. ISO/IEC 8859-4 (LATIN-4)-Nordic language ISO/IEC 8859-5 (Cyrillic)-Slavic languages ISO/IEC 8859-6 (Arabic)-Arabic ISO/IEC 8859-7 (Greek)-Greek ISO/IEC 8859-8 (Hebrew)-Hebrew (visual order) 8859-8-i-Hebrew (logical order) ISO/IEC 8859-9 (Latin-5 or Turkish)-it changes the Icelandic alphabet of Latin-1 and adds Turkish characters. Mother. ISO/IEC 8859-10 (Latin-6 or Nordic)-North Germanic language branch, used instead of Latin-4. ISO/IEC 8859-11 (Thai)-Thai, evolved from the TIS620 standard Word set in Thailand. ISO/IEC 8859-13 (Latin-7 or Baltic Rim)-Baltic languages ISO/IEC 8859-14 (LATIN-8 or Celtic)-Celtic language ISO/IEC 8859-15 (LATIN-9)-Western European, joined LAT In-1 lacks Finnish and uppercase French accented letters, and the euro (€) symbol. ISO/IEC 8859-16 (LATIN-10)-South-Eastern European language. It is mainly used in Romanian language and is added to the euro symbol. Since English does not have any accented letters (regardless of foreign words), it can be represented by any one of the above 15-word sets. As for the German side, because it only uses ä,ö,ü,ä,ö,ß,ü seven letters in addition to A-Z, A-Z, and all Latin characters (1-4, 9-10, 13-16) have this seven letters, so German can be represented by any of the 10 word sets above. The reason for the absence of number 12th in this series is that the plan was originally designed as a "Latin-7" that included the Celtic character set, but later Celtic became ISO 8859-14/latin-8. There was also a saying that 12th was originally reserved for the Indian Tiancheng, but was later shelved.
5.Unicode encoding
(8) Java Fundamentals-character encoding