Commit bcc5c076 authored by Yoshinori Okuji's avatar Yoshinori Okuji

by seb, parseString does not support iso-8859-1 characters, so convert template_xml to utf-8


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@937 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2276d7ac
...@@ -255,6 +255,9 @@ class ERP5ReportTool(ReportTool): ...@@ -255,6 +255,9 @@ class ERP5ReportTool(ReportTool):
#if not template: #if not template:
if 1: if 1:
template_xml = getattr(context, templatename)(*args, **kwargs) template_xml = getattr(context, templatename)(*args, **kwargs)
if type(template_xml) is not type(u'a'):
template_xml = unicode(template_xml,encoding=encoding)
template_xml = template_xml.encode('utf-8')
template_dom = xml.dom.minidom.parseString(template_xml) template_dom = xml.dom.minidom.parseString(template_xml)
template = TemplateParser(template_dom,encoding,resourceHandler=rhandler)() template = TemplateParser(template_dom,encoding,resourceHandler=rhandler)()
#self._v_templatecache[templatename] = template #self._v_templatecache[templatename] = template
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment