decode 解码
encode 编码
1.decode作用
将其他编码的字符串转换成unicode编码
示例:
str.decode('gb2312')
2.encode作用
将unicode编码的字符串转换成其他编码
示例:str.encode('gb2312')
decode 解码
encode 编码
1.decode作用
将其他编码的字符串转换成unicode编码
示例:
str.decode('gb2312')
2.encode作用
将unicode编码的字符串转换成其他编码
示例:str.encode('gb2312')
本文标题:encode() 和 decode()
本文链接:https://www.haomeiwen.com/subject/tslldctx.html
网友评论