Unicode problem in ChoiceField
|Reported by:||Mihai Damian||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a ChoiceField defined like this:
country = forms.ChoiceField(choices,required=False,label=_('Country'))
,where country is a list of tuples of the form (countrycode, countryname).
countrycode is always ASCII but some countrynames are UNICODE. If the tuples contain no UNICODE strings, all works fine. If I add to that just one tuple with UNICODE the whole form doesn't get rendered anymore (I use form.as_table to render the whole table for now). No errors are displayed, it just fails to render the form.
I saw there was a previous ticket with ChoiceFields not working with UNICODE but from what I understood the issue was supposed to be solved a long time ago