#3597: UnicodeDecode error when ChoiceField(w=RadioSelect) has Unicode choices
-----------------------------------------------------+----------------------
Reporter: Georgi Stanojevski <glisha gmail com> | Owner:
mtredinnick
Status: new | Component:
django.newforms
Version: SVN | Resolution:
Keywords: UnicodeDecodeError RadioSelect | Stage:
Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-----------------------------------------------------+----------------------
Comment (by mtredinnick):
Wow... this did turn out to be the right patch (thanks, Georgi), for a
tricky reason: Python treats whatever is returned from a {{{__unicode__}}}
method as a unicode object. So it subsequently was trying to re-encode the
result into a string, rather than using the string object we were
returning. Forcing the method to return a pure unicode object cures the
problem.
--
Ticket URL: <http://code.djangoproject.com/ticket/3597#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---