中文字符处理
str<---->unicode
从左到右是decode ,从右往左是encode
<type 'str'> ---><type 'unicode'>
decode('utf-8','gbk','gb2312')
<type 'unicode'> ---><type 'str'>
encode('utf-8','gbk','gb2312')
https://blog.csdn.net/qq_27871973/article/details/82389643
中文字符处理
str<---->unicode
从左到右是decode ,从右往左是encode
<type 'str'> ---><type 'unicode'>
decode('utf-8','gbk','gb2312')
<type 'unicode'> ---><type 'str'>
encode('utf-8','gbk','gb2312')
https://blog.csdn.net/qq_27871973/article/details/82389643
相关文章: