encode decode

基本:字符串在python内部的表示是Unicode编码。

因此在做编码转换时,通常需要以Unicode作为中间编码

既:先将其它编码解码(decode)成Unicode,在从Unicode编码成(encode)成另一种编码

*decode的作用是将其它编码转换成Unicode编码

*encode的作用是将Unicode编码转换为其它编码

猜你喜欢

转载自blog.csdn.net/weixin_42100915/article/details/80175606