fixed some unicode issue

This commit is contained in:
Goffi 2010-12-27 17:20:25 +01:00
commit 60fe3deea7
2 changed files with 2 additions and 2 deletions

View file

@ -97,7 +97,7 @@ class Param():
def save_xml(self, file):
"""Save parameters template to xml file"""
with open(file, 'wb') as xml_file:
self.dom.writexml(xml_file)
xml_file.write(self.dom.toxml('utf-8'))
def save_data(self, file):
"""Save parameters data to file"""

View file

@ -73,7 +73,7 @@ def tupleList2dataForm(values):
def paramsXml2xmlUI(xml):
"""Convert the xml for parameter to a SàT XML User Interface"""
params_doc = minidom.parseString(xml)
params_doc = minidom.parseString(xml.encode('utf-8'))
top = params_doc.documentElement
if top.nodeName != 'params':
error(_('INTERNAL ERROR: parameters xml not valid'))