i am developing a plugin for getting rss from a website which is utf-8, when loading the code from the site, i got these error: 

<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xe5 in position 9

here is the code what i used before:

title = entry_rss.title.encode('UTF-8')

then i use these code to resolve this issue:

title = entry_rss.title.encode('UTF-8')
title = unicode(title, "utf-8")

 

Have fun with python! 

 

相关文章:

  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-12-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案