Mercurial > libervia-backend
changeset 214:e178e8f6d13a
fixed some unicode issue
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 27 Dec 2010 17:20:25 +0100 |
parents | 5c420b1f1df4 |
children | 370f387a43c0 |
files | tools/memory.py tools/xml_tools.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/memory.py Mon Dec 27 15:14:28 2010 +0100 +++ b/tools/memory.py Mon Dec 27 17:20:25 2010 +0100 @@ -97,7 +97,7 @@ 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"""
--- a/tools/xml_tools.py Mon Dec 27 15:14:28 2010 +0100 +++ b/tools/xml_tools.py Mon Dec 27 17:20:25 2010 +0100 @@ -73,7 +73,7 @@ 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'))