[FIX] Accented characters are displayed on footer now

lp bug: https://launchpad.net/bugs/406489 fixed

bzr revid: jvo@tinyerp.com-20090731085710-vzjiy4yuf7urmccz
This commit is contained in:
VRA(OpenERP) 2009-07-31 14:27:10 +05:30 committed by Jay (Open ERP)
parent 68785e3579
commit c7cc86b376
2 changed files with 4 additions and 3 deletions

View File

@ -216,7 +216,7 @@ class _rml_canvas(object):
self.canvas.setTitle(self.title)
def _textual(self, node, x=0, y=0):
rc = utils._process_text(self, node.text or '')
rc = utils._process_text(self, node.text.encode('utf-8') or '')
for n in node:
if n.tag == 'seq':
from reportlab.lib.sequencer import getSequencer

View File

@ -41,6 +41,7 @@ import re
import reportlab
from lxml import etree
import copy
import tools
_regex = re.compile('\[\[(.+?)\]\]')
@ -111,7 +112,7 @@ def _process_text(self, txt):
pass
if type(txt)==type('') or type(txt)==type(u''):
txt2 = str2xml(txt)
result += txt2
result += tools.ustr(txt2)
elif (txt is not None) and (txt is not False):
result += str(txt)
return result
@ -119,7 +120,7 @@ def _process_text(self, txt):
def text_get(node):
rc = ''
for node in node.getchildren():
rc = rc + node.text
rc = rc + tools.ustr(node.text)
return rc
units = [