分页: 173/248 第一页 上页 168 169 170 171 172 173 174 175 176 177 下页 最后页 [ 显示模式: 摘要 | 列表 ]

python 编码转换 不指定

root , 2007/09/22 14:48 , Python , 评论(0) , 阅读(5576) , Via 本站原创
python常用编码转换函数:
(1)   unicode()        
         全局函数,将str字符串从其它编码(如gb2312)转换为unicode对象
(2)   str.decode()    
         str字符串的方法,将str字符串从其它编码(如gb2312)转换为unicode对象,与unicode()很相似.
(3)   str.encode()    
         str字符串的方法,
(4)  unicode.encode()
         unicode对象的方法,将unicode对象转成其它相应编码的str字符串对象,如gb2312.
(5)  unicode.decode()
         unicode对象的方法
分页: 173/248 第一页 上页 168 169 170 171 172 173 174 175 176 177 下页 最后页 [ 显示模式: 摘要 | 列表 ]