Inextricably linked character set ASCII, Unicode, UTF-8----If you're confused, come on.

Source: Internet
Author: User

Nothing to learn about Python, when you see the Python character type, there is a reference to the character set, the problem of the character set I've never figured out, what's the difference between ASCII, Unicode, UTF-8? By this opportunity finally is a little bit of understanding, record, study.

people who talk about character sets, must be dealing with computers, because computers can only deal with numbers, there is no human such ultra-high intelligence, if the computer needs to process text, Then you have to convert the text into numbers. So here's the question: How do you translate the text into numbers? The smart man thought of the character set. The oldest computer was designed with 8 bits (bit) as a byte (byte), which means 8 bits a byte. Therefore, a word energy-saving representation of the largest integer is 255 (28 -1, binary number 1111 1111 = decimal 255), if you want to represent a larger number, you must take more bytes, such as two bytes representing the largest integer is 65535 (216 -1).

Since the computer was born in the United States, it was initially encoded into a computer with uppercase and lowercase letters, numbers, and some symbols ASCII编码 , such as the code for capital A is 65, and the lower case z is encoded as 122. The following is an ASCII encoding table, ^_^:

Original address: Read more >>

Inextricably linked character set ASCII, Unicode, UTF-8----If you're confused, come on.

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.