JamesLiAndroid / xbmc-addons-chinese

Automatically exported from code.google.com/p/xbmc-addons-chinese
0 stars 0 forks source link

Tudou plug-in gbk encoding issue with xbmc eden #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Used 1.0.6 (latest 2012 update; added a new channel).

In /private/var/mobile/Library/Preferences/xbmc.log you will see something 
about:

httpdata = unicode(httpdata, charset).encode('utf8','ignore')
                                            UnicodeDecodeError: 'gbk' codec can't decode bytes in position 68587-68588: illegal multibyte sequence

Workaround:

/private/var/mobile/Library/Preferences/XBMC/addons/plugin.video.tudou/default.p
y (line 28)

in GetHttpData

 httpdata = unicode(httpdata, charset).encode('utf8')

change to 

 httpdata = unicode(httpdata, charset, 'ignore').encode('utf8','ignore')

I attached the patched file. I don't know if that's the right fix but at least 
it works now.

Original issue reported on code.google.com by naer.ch...@gmail.com on 19 Jan 2012 at 4:51

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by taxi...@sina.com on 19 Jan 2012 at 5:26

GoogleCodeExporter commented 8 years ago
fixed at r189, thx

Original comment by taxi...@sina.com on 19 Jan 2012 at 5:30