python之路day1

字符编码

ASICC  一个字符占8位(1byte)

unicode(统一码,万国码,单一码) 不管是中文还是英文,一个字符占16位(2bytes)

utf-8  所有的英文字符都是按ASICC码来存;中文按utf-8来存(需要3bytes)

 

 

ASICC     255    1bytes

       -----1980    gb2312  7xxx

       ----1995    GBK1.0  2W+

        ----2000    GB18030    17xxx

          ----unicode  2bytes

            ----utf-8    en:1bytes;  中文:3bytes

 

posted @ 2017-06-09 16:44  荒天帝001  阅读(202)  评论(1编辑  收藏  举报