Commit bd417487 authored by Yoshinori Okuji's avatar Yoshinori Okuji

The default encoding is changed to UTF-8.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1403 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1b6b6cd8
...@@ -284,7 +284,7 @@ def create_settings_form(): ...@@ -284,7 +284,7 @@ def create_settings_form():
stored_encoding = fields.StringField('stored_encoding', stored_encoding = fields.StringField('stored_encoding',
title='Encoding of form properties', title='Encoding of form properties',
default='ISO-8859-1', default='UTF-8',
required=1) required=1)
unicode_mode = fields.CheckBoxField('unicode_mode', unicode_mode = fields.CheckBoxField('unicode_mode',
title='Form properties are unicode', title='Form properties are unicode',
......
...@@ -276,7 +276,7 @@ class ERP5ReportTool(ReportTool): ...@@ -276,7 +276,7 @@ class ERP5ReportTool(ReportTool):
if context is None: if context is None:
context = self context = self
encoding = kwargs.get('encoding') or 'iso-8859-1' encoding = kwargs.get('encoding') or 'UTF-8'
rhandler = ERP5ResourceHandler(context, getattr(self, 'resourcePath', None)) rhandler = ERP5ResourceHandler(context, getattr(self, 'resourcePath', None))
#template = self._v_templatecache.get(templatename,None) #template = self._v_templatecache.get(templatename,None)
...@@ -285,7 +285,7 @@ class ERP5ReportTool(ReportTool): ...@@ -285,7 +285,7 @@ class ERP5ReportTool(ReportTool):
template_xml = getattr(context, templatename)(*args, **kwargs) template_xml = getattr(context, templatename)(*args, **kwargs)
if type(template_xml) is not type(u'a'): if type(template_xml) is not type(u'a'):
template_xml = unicode(template_xml,encoding=encoding) template_xml = unicode(template_xml,encoding=encoding)
template_xml = template_xml.encode('utf-8') 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