Common sense - coding knowledge

Common coding: ASCII code, Unicode code, UTF-8, GBK

 

Coding :

  【solved problem】

    Our program written ( character : characters and digital information) converted to the corresponding 0-1codes i.e., the bottom of the machine instructions in the computer

  【How to achieve】

    Construction of a coding table, corresponding to all characters of encoding a 0-1;

The programming process the garbage problem:

  【root cause】

    Different codes: 0-1 different binary strings with different character code generation, it is different and the execution result;

    Encoding is not uniform;

Common garbage problem:

  1 read the file garbled

  【Cause Analysis】

    With the original document with a different encoding when reading a file; for example: I used GBK encoded file, you are using ASCII code reading, there will be Chinese garbled;

  【Solutions】

    1 clear: the encoding format of the original document

    2 reads the encoding format file in the source file;

  2 bitstream and the character conversion process stream coding problem did not notice

  【Solutions】

    Original file in the original codec format Unicode, and then a new encoding format encoding;

 

 

Reference: https://blog.csdn.net/SL_World/article/details/88380693

  https://www.liaoxuefeng.com/wiki/1016959663602400/1017075323632896

 

Guess you like

Origin www.cnblogs.com/floakss/p/11495544.html
Recommended