Commit c4100d61 authored by Bartek Górny's avatar Bartek Górny

when encoding is bad, replace chars instead of raising exception (so that we...

when encoding is bad, replace chars instead of raising exception (so that we get some output, albeit ugly)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9166 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6b118d8e
......@@ -305,7 +305,7 @@ class ERP5ReportTool(ReportTool):
# XXXXX Because reportlab does not support UTF-8, use Latin-1. What a mess.
template_xml = unicode(template_xml,encoding).encode('iso-8859-1')
document_xml = unicode(document_xml,encoding).encode('iso-8859-1')
document_xml = unicode(document_xml,encoding).encode('iso-8859-1','replace')
encoding = 'iso-8859-1'
# create the PDFTemplate from xml
......
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