python---字符编码与转码

1.在python2: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #-*- coding:utf-8 -*- import  sys print (sys.getdefaultencoding())              #获取系统默认编码   #1.utf-8转gbk s  =  "你好" s_to_unicode  =  s.decode( "ut
相关文章
相关标签/搜索