Opened 10 years ago

Closed 10 years ago

#7122 closed (invalid)

Unicode problem in ChoiceField

Reported by: Mihai Damian Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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

Change History (1)

comment:1 Changed 10 years ago by Mihai Damian

Resolution: invalid
Status: newclosed

OK, it seems there was an encoding problem in one of my files. Works fine

Note: See TracTickets for help on using tickets.
Back to Top