c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #00504
[Bug 537449] Re: Report Fails to handle accented chars
Thanks to Dukai,
He pointed us to this important ill-treatment to accented chars.
@subscribers,
Please follow the attached patched at https://bugs.launchpad.net/openobject-server/+bug/662598.
Thanks.
--
Report Fails to handle accented chars
https://bugs.launchpad.net/bugs/537449
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.
Status in OpenObject Server: New
Status in OpenObject Server 5.0 series: Confirmed
Status in OpenObject Server trunk series: New
Bug description:
Hi,
When you try to print a report (RML) with non-ascii characters, like in the string 'día', you get an error that says that can't decode the character.:
File "/opt/openerp/trunk_pxgo/server/bin/report/render/rml2pdf/utils.py", line 109, in _process_text
result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
Looking at the stable version (5.0), there is a difference:
result += tools.ustr(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
instead of 5.2:
result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
is this okay? i've tried to change the methods and I've got success (importing previusly "tools").
sorry for the explanation