1

When I try to convert sxw file to rml file using OpenOffice , this error occurs :

Exception: 'asci' codec can't encode character u'\xe9'

what's the meaning of that error? and how can I fix it?

Spirit angel
  • 191
  • 5
  • 16

2 Answers2

1

please check this link UnicodeEncodeError when trying to convert Django models to XML This is the same issue that we got here. You can use yourfield.encode("utf-8") or use format() in openerp. [[format(obj.your_str_field or '')]]

Community
  • 1
  • 1
OmaL
  • 5,037
  • 3
  • 31
  • 48
  • can you tell me where can I use encode("utf-8") because test:fields.text('Test').encode("utf-8") doesn't work – Spirit angel Jun 05 '12 at 09:47
  • in openerp addons, you can find a file account > report > account_print_invoice.sxw In this file you can find a code like [[ format(l.note or '') or removeParentNode('tr') ]] Here l.note is a text field and it is given in the format() function. try using this format function.. – OmaL Jun 05 '12 at 10:51
  • Thank you sir for your help.I think some accented char in my .sxw file cause that error – Spirit angel Jun 06 '12 at 09:08
0

We have Similar issues posted on lp: https://bugs.launchpad.net/openobject-server/+bug/956798 and it has been fixed on linked branch you can take the patch apply, which will make your report to tolerate the Unicode encoding.

Thank You

ifixthat
  • 6,137
  • 5
  • 25
  • 42