美文网首页
encode() 和 decode()

encode() 和 decode()

作者: luckybabying | 来源:发表于2019-08-02 13:52 被阅读0次

decode  解码

encode  编码

1.decode作用

    将其他编码的字符串转换成unicode编码

    示例:

    str.decode('gb2312')

2.encode作用

    将unicode编码的字符串转换成其他编码

    示例:str.encode('gb2312')

相关文章

网友评论

      本文标题:encode() 和 decode()

      本文链接:https://www.haomeiwen.com/subject/tslldctx.html