Opened 3 years ago

Closed 2 years ago

#20510 closed Bug (invalid)

Form field's label should be unicode

Reported by: akaariai Owned by: nobody
Component: Forms Version: 1.6-alpha-1
Severity: Normal Keywords:
Cc: bmispelon@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Form field's label should always be converted to unicode when using Python 2, even if it is defined as non-unicode string. The conversion is done in 1.5, but not in 1.6-alpha-1. See and for master and stable/1.5.x test cases.

Attachments (1)

20510-1.diff (4.3 KB) - added by claudep 3 years ago.
Loud failing for non-ascii bytestrings

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by bmispelon

  • Cc bmispelon@… added

Looks like this was intended behavior, introduced by 066bf42675040abd7b1a42e5559890e5f9881058.

Changed 3 years ago by claudep

Loud failing for non-ascii bytestrings

comment:2 Changed 3 years ago by claudep

  • Has patch set

Just attached one way to solve this (failing loudly).

comment:3 Changed 3 years ago by akaariai

I just don't see what is gained by not doing the conversion in field's init. Django allows mixing unicode and str in a lot of places, so why removing that ability from this place only is a good idea? I can see what is gained by consistent use of unicode strings everywhere in Django, but that isn't gained by the original commit.

Still, I don't feel too strongly about this, so if nobody else complains about this then I don't see a need to act on this ticket.

comment:4 Changed 2 years ago by akaariai

  • Resolution set to invalid
  • Status changed from new to closed

Nobody seems to be complaining, so closing this.

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