tweak, polish argument for encoding

This commit is contained in:
Jérôme Rapinat 2015-03-20 09:13:24 +01:00
parent 727d96cc22
commit 1e0d34dc4f

View File

@ -174,7 +174,7 @@ def TipsParse(filename, mark):
tip = tip.replace("<?xml version='1.0' encoding='UTF-8'?>", "")
tip = tip.replace('\n<_tip number="%(number)s">' % key.attrib, "")
else: # python3 support
tip = tip.decode(encoding="UTF-8")
tip = tip.decode("utf-8")
tip = tip.replace('<_tip number="%(number)s">' % key.attrib, "")
tip = tip.replace("<br />", "<br/>")
#tip = tip.replace("\n</_tip>\n", "</_tip>\n") # special case tip 7