diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py index 68fa627537067eb0657e9b72d8c9998edad86548..a7c98a97f9d06b67b1af8633da58e7172072869f 100755 --- a/product/ERP5Form/Form.py +++ b/product/ERP5Form/Form.py @@ -284,7 +284,7 @@ def create_settings_form(): stored_encoding = fields.StringField('stored_encoding', title='Encoding of form properties', - default='ISO-8859-1', + default='UTF-8', required=1) unicode_mode = fields.CheckBoxField('unicode_mode', title='Form properties are unicode', diff --git a/product/ERP5Form/PDFTemplate.py b/product/ERP5Form/PDFTemplate.py index 200b50b04b27c75008602d65bcbff16c69d65d8e..d2797f157834dc4f7f4dc3c37b7b81c3b18bab70 100755 --- a/product/ERP5Form/PDFTemplate.py +++ b/product/ERP5Form/PDFTemplate.py @@ -276,7 +276,7 @@ class ERP5ReportTool(ReportTool): if context is None: context = self - encoding = kwargs.get('encoding') or 'iso-8859-1' + encoding = kwargs.get('encoding') or 'UTF-8' rhandler = ERP5ResourceHandler(context, getattr(self, 'resourcePath', None)) #template = self._v_templatecache.get(templatename,None) @@ -285,7 +285,7 @@ class ERP5ReportTool(ReportTool): 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_xml = template_xml.encode('UTF-8') template_dom = xml.dom.minidom.parseString(template_xml) template = TemplateParser(template_dom,encoding,resourceHandler=rhandler)() #self._v_templatecache[templatename] = template