转自

http://www.cnblogs.com/evening/archive/2012/04/19/2457440.html

总结一句话

encode:    字符串打算输出(给别人用)比如print时候encode成gbk不会乱码

decode:  字符串打算(用别人的做)输入,比如打开文本文件比如抓网页时候根据对方格式decode

相关文章:

  • 2021-10-11
  • 2022-12-23
  • 2021-10-28
  • 2021-07-19
  • 2021-10-13
  • 2021-12-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
相关资源
相似解决方案