Opened 6 years ago

Closed 6 years ago

#7122 closed (invalid)

Unicode problem in ChoiceField

Reported by: MihaiD 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

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by MihaiD

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.