On Wed, Sep 16, 2009 at 3:32 PM, Karen Tracey <kmtra...@gmail.com> wrote:
> repr needs to return a string, you are returning unicode.  The automatic
> unicode-to-string conversion done by Python will use the ascii codec, which
> has no way of representing 'ã'. You should probably be returning the repr of
> the unicode value.  That won't result in something easily read (as the
> non-ASCII values will appear escaped) but it is safest.  Alternatively you
> can explicitly encode the unicode value using a codec (e.g. utf8) that can
> represent any characters that may appear in it, but you may then run into
> other problems down the line with things using the repr value and not
> knowing what its encoding is.
>

didn't know that.

Thank you.

-- 
Kind Regards

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to