2014-06-20, 07:48
Hi.
Running XBMC 13.1, french users may have script error when :
- using a smart playlist named with accented characters, like Animés.xsp
- using Random And Last Items script addon (or any script that try to open an XML file with accented character using dom parser)
See line 847 :
http://xbmclogs.com/show.php?id=230286
This error cannot be fixed in Random And Last Items script but can be easily fixed by using .decode('utf-8') method to file object in expatbuilder.py.
This kind of fix have to be done by XBMC team or dom parser team ?
Thanks.
Running XBMC 13.1, french users may have script error when :
- using a smart playlist named with accented characters, like Animés.xsp
- using Random And Last Items script addon (or any script that try to open an XML file with accented character using dom parser)
See line 847 :
http://xbmclogs.com/show.php?id=230286
This error cannot be fixed in Random And Last Items script but can be easily fixed by using .decode('utf-8') method to file object in expatbuilder.py.
Code:
def parse(file, namespaces=True):
"""Parse a document, returning the resulting Document node.
'file' may be either a file name or an open file object.
"""
if namespaces:
builder = ExpatBuilderNS()
else:
builder = ExpatBuilder()
if isinstance(file, StringTypes):
fp = open(file.decode('utf-8'), 'rb')
try:
result = builder.parseFile(fp)
finally:
fp.close()
else:
result = builder.parseFile(file)
return result
This kind of fix have to be done by XBMC team or dom parser team ?
Thanks.