testing error ignoring with utf encode

This commit is contained in:
q
2012-05-02 22:38:21 +03:00
parent 8536a44e97
commit 565876b79f

View File

@@ -291,7 +291,7 @@ def getinfo(path):
if not os.path.exists(os.path.join(path,'info.txt')): if not os.path.exists(os.path.join(path,'info.txt')):
return '' return ''
reader = open(os.path.join(path,'info.txt'),'r') reader = open(os.path.join(path,'info.txt'),'r')
return unicode(reader.read(),encoding="utf8").encode('ascii','xmlcharrefreplace') return unicode(reader.read(),encoding="utf8",errors="ignore").encode('ascii','xmlcharrefreplace')
def crumblinks(crumbs): def crumblinks(crumbs):
''' Create the HTML string for crumb trails ''' ''' Create the HTML string for crumb trails '''