Basic concepts of coding

Source: Internet
Author: User
Tags control characters

1. encoding and decoding

The information stored in the computer is represented by binary numbers. The information displayed on the screen (English letters, Chinese characters, and other characters) is converted from binary numbers. In layman's terms, the characters are stored as binary numbers according to certain rules, for example, what is 'A', called "encoding"; otherwise, the binary numbers are parsed and displayed, it is called "decoding. If an incorrect decoding rule is used during decoding, 'A' is resolved to 'B' or garbled.

2. Character Set)

Is a collection of all abstract characters supported by the system. A character is a general term for all types of texts and symbols, including Chinese characters, punctuation marks, graphical symbols, and numbers.

3. characterencoding)

It is a set of rules that can be used to pair a set of natural language characters (such as an alphabet or syllable table) with a set of other things (such as numbers or electric pulses. That is, the correspondence between the Symbol Set and the digital system is established.

4. Common Character Set names

ASCII character set, gb2312 Character Set, big5 Character Set, gb18030 character set, and Unicode Character Set. To accurately process characters in various character sets, a computer must encode the characters so that the computer can recognize and store various texts.

ASCIIAmerican Standard Code for information interchange is a computer coding system based on Latin letters. It is mainly used to display Modern English, while its extended version eascii can barely show other Western European languages. It is currently the most common single-byte encoding system (but there are signs of Unicode catching up ).

ASCII character set: It consists of 33 control characters (enter key, Return key, and line feed key) and 95 display characters (uppercase/lowercase English letters, Arabic numerals, and 26 basic Latin letters ).

ASCII code: Rules for converting the ASCII character set to numbers of computer acceptable numeric systems. A 7-bit (BITs) Character Set can contain a total of 128 characters. However, a 7-bit encoding character set can only contain 128 characters. To represent more common European characters, ASCII is extended, the ASCII extended Character Set uses eight bits to represent a single character, with a total of 256 characters

UnicodeIt is developed based on the standard of the Universal Character Set and published in the form of books. Unicode is constantly expanding. More characters are inserted in each new version. Unicode contains more than 100,000 characters in the sixth edition so far) A group of code charts that can be used as a visual reference, a set of encoding methods and a set of standard character encoding, a set of enumerations that contain character features such as superscript and subscript. The Unicode Consortium is operated by a non-profit organization and leads Unicode
To replace the existing character encoding scheme with the Unicode encoding scheme, especially in the multi-language environment, there is only limited space and incompatibility issues.
(It can be understood that Unicode is a character set, and UTF-32/UTF-16/UTF-8 are three character encoding schemes .)

What are short and wide characters.
The so-called short character is represented by 8-bit characters. The typical application is ASCII code, while the wide character, as the name suggests, is represented by 16-bit characters, typical include Unicode.
ASCII:A Chinese character is 2 characters, 2 bytes; an English letter is 1 character, 1 byte !!
UNICODE:One Chinese character is counted as 1 character, 2 bytes; English letters are counted as 1 character, 2 bytes !!
No matter whether it is ascii or Unicode, empty characters are used to end.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.