Comment 18 for bug 290494

Revision history for this message
Bruno (bruno666-666) wrote :

Here's the patch to apply to po2html.py

--- translate-toolkit-1.1.1/translate/convert/po2html.py.old 2008-11-05 17:18:17.000000000 +0100
+++ translate-toolkit-1.1.1/translate/convert/po2html.py 2008-11-05 17:18:50.000000000 +0100
@@ -81,7 +81,7 @@
                 htmlresult = htmlresult.replace(msgid, msgstr, 1)
         htmlresult = htmlresult.encode('utf-8')
         if tidy:
- htmlresult = str(tidy.parseString(htmlresult))
+ htmlresult = str(tidy.parseString(htmlresult, **{'char_encoding': "utf8"}))
         return htmlresult

 def converthtml(inputfile, outputfile, templatefile, wrap=None, includefuzzy=False):