python2中文字符处理,字符串处理

中文字符处理

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

相关文章:

  • 2022-01-18
猜你喜欢
  • 2021-08-13
  • 2021-09-28
  • 2021-04-08
相关资源
相似解决方案