What steps will reproduce the problem?
1. Save a object with a text value encoded in utf-8 (with accents)
What is the expected output? What do you see instead?
Saving the object without trouble, instead there is an encoding error :
/env/lib/python2.5/site-packages/pyactiveresource/util.py in to_xml(obj, root,
pretty, header)
234 element = ET.SubElement(root_element, key)
235 if value is not None:
--> 236 element.text = str(value)
237 if isinstance(value, bool):
238 element.text = element.text.lower()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position
53: ordinal not in
range(128)
I've attached a patch that fix it (without unit test).
Original issue reported on code.google.com by timothee...@gmail.com on 19 Jun 2009 at 11:05
Original issue reported on code.google.com by
timothee...@gmail.com
on 19 Jun 2009 at 11:05Attachments: