[12. Character set] Zero-based learning python, simple and rude

what is a character set

  • The way the computer records the text is recorded by the character set serial number;
  • The storage of each character is realized by its serial number in the character set, including spaces, line breaks, punctuation, etc.;
  • The earliest character set is ASCII, which only includes upper and lower case letters, Arabic numerals, and some basic symbols;
  • With the popularization of computers in various countries around the world, due to the multitude of languages ​​in the world, various character sets adapted to different languages ​​have been born;
  • Character sets specially adapted to Chinese include GBK, GB2312, etc. For example, the Chinese version of Windows operating system uses the GBK character set;
  • But no matter what character set, ASCII is completely included in the first 128 bits by default;
  • Due to the different character sets used in different hosts, serious data transmission garbled problems are caused;
  • The UTF-8 character set contains common characters in various languages ​​of the world, and is gradually becoming a tacit industry standard in a sense;

ASCII character set

  • American Standard Code for Information Interchange;
  • Including the most basic 128 characters, it is the earliest and most basic character set;
  • The content includes upper and lower case letters, Arabic numerals, and some common symbols;
  • The exchange of serial number and character can use two built-in functions of chr(order) and ord(character);
  • ASCII code table 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325483485&siteId=291194637