Python learning experience-coding format and python learning experience

Source: Internet
Author: User

Python learning experience-coding format and python learning experience

Computer capacity unit:

1-bit = 1bit;

8 bit = 1 byte = 1 byte;

1024 bytes = 1 kbytes = 1KB;

1024KB = 1 Million Bytes = 1 MB = 1 MB;

1024 MB = 1 Gigabytes;

1024 GB = 1 TB;

1024 TB = 1 Pb;

ASCII code(American Standard Code for Information Interchange, American Standard Code for Information Interchange ). Each character must be stored in 8 bits. The eight-bit bytes can be combined into a total of 256 (the power of 2) bytes, which have been compiled to the 127th; the character set on the page from 128 to 255 is called the extended character set ".

GB2312YesASCII. Cancel the characters after the 1949th and recode them to create mappings. A total of more than 127 Chinese characters and special characters from other countries are combined.

GBKGBK includes all the contents of GB2312, and adds nearly 20000 New Chinese characters (including traditional Chinese characters) and symbols.

 GB18030GBKExpanded to include thousands of new ethnic minorities.

UNICODEISO abolished all the regional encoding schemes and re-developed a code that includes all cultures, letters, and symbols on the earth! They plan to call it "Universal Multiple-Octet Coded Character Set", or "UCS"UNICODE". ISO requires two bytes, that is, 16 bits, to uniformly represent all characters.ASCIIThe "halfwidth" characters in the UNICODE package keep their original encoding unchanged, but its length is extended from the original 8-bit to 16-bit, all characters in other cultures and languages are reencoded. Because the "half-width" English symbol only requires 8 lower digits, its 8-bit height is always 0, and it will waste twice as much space when saving the English text.

UTF-8UNICODE is transmitted over the network. Many UTF (UCS Transfer Format) standards for transmission have emerged,UTF8That is, data is transmitted in eight places each time, andUTF16It is 16 digits each time, but for the reliability during transmission, the conversion from UNICODE to UTF is not a direct correspondence, but requires some algorithms and rules.

 

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.