#3904: UnicodeDecodeError with RadioSelect and funky characters
----------------------------------------------+-----------------------------
Reporter: Ville Säävuori <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: django.newforms
Version: SVN | Keywords: unicode, newforms
Stage: Unreviewed | Has_patch: 0
----------------------------------------------+-----------------------------
I have following list of genders:
{{{
GENDERS = (
('0', u'En tiedä'),
('1', u'Mies'),
('2', u'Nainen'),
)
}}}
And following line in my form:
{{{
gender = forms.ChoiceField(choices=GENDERS,
widget=forms.RadioSelect(attrs={'class': 'gender'}), label="Sukupuoli")
}}}
And i get this error
{{{
UnicodeDecodeError
'ascii' codec can't decode byte 0xc3 in position 204: ordinal not in
range(128)
.. /django/newforms/forms.py in _html_output, line 129
}}}
A temporary fix is to convert the problematic chars to HTML entities like:
{{{
GENDERS = (
('0', u'En tiedä'),
('1', u'Mies'),
('2', u'Nainen'),
)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/3904>
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
-~----------~----~----~----~------~----~------~--~---