Several summary of the coding problem

    Do program development, the garbage problem is the problem we often encounter, I recently read a lot of information, do a lot of testing, so today to be a summary, which is convenient to see his own future, but also to help other people confused by this. Part reference https://www.zhihu.com/question/20650946.
    1, the coding scheme classification
was generally more common is the beginning of 1, GB, including GB2312, GBK, GB18030. GB national standard that is referred to, specifically for the Chinese coding, is one of the more popular coding scheme, a character occupies two bytes. 2, Unicode, including the UTF8, UTF16 (the BE / LE). UTF8 is currently the most widely used international coding scheme, the English one byte characters, Chinese characters are represented by three characters. The UTF16 is Chinese and English characters are unified by two bytes. Many unicode encoding software displays the actual default is UTF16, ansi for use GBK Simplified Chinese is actually represented us. As with many software prompts or without BOM BOM represents whether a coded label instructions at the top to save the file, the label is the BOM. Generally, we use without the BOM.
2, the executable code of the program

Encoded executable program depends directly on your editor, and your compiler independent. That is if your editor used GB2312, that no matter what compile your program, encoded final executable program is GB2312, because you submitted to the compiler characters have been converted editor for the corresponding binary encoding.

Published 12 original articles · won praise 4 · views 20000 +

Guess you like

Origin blog.csdn.net/wuzhidefeng/article/details/78551469