Python encoding format

Source: Internet
Author: User

1, there are many kinds of coding, Chinese GB2312, ASCII code of the United States, Japanese shift-jis and so on. When storing, the bytes accounted for is not the same, for example: China's GB2312 accounted for two bytes, the United States ASCII accounted for one byte

2, the international unification of a code: Unicode accounted for two bytes, which led to some countries disagree.

3, so will invent the UTF-8, the code is a variable word length encoding format, indicating that the letter with a byte, indicating the Chinese character with two bytes

4, in this case, basically we write code, or text, are stored in UTF-8, but after loading into memory, these things will be interpreted as Unicode encoding, and then converted to binary.

Python encoding format

Related Article

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.