Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#18409 closed Bug (fixed)

Make RegexField work with unicode characters

Reported by: Julien Phalip Owned by: nobody
Component: Forms Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently RegexField won't work with unicode characters. So for example it's not possible to have a username containing unicode characters using the contrib.auth forms.

It's a really simple fix (see pull request below) but I'm not sure if this is risky or potentially backwards compatible. If so then perhaps one could consider adding a new UnicodeRegexField class?

Change History (6)

comment:2 by Julien Phalip, 12 years ago

FYI, see all the "When UNICODE flag" notes in http://docs.python.org/library/re.html#regular-expression-syntax

I think this is fine, but I'd like to get other opinions.

comment:3 by Claude Paroz, 12 years ago

Triage Stage: UnreviewedAccepted

++1 for unicode. If test suite passes, go for it!

comment:4 by Julien Phalip, 12 years ago

Triage Stage: AcceptedReady for checkin

Cool! Thanks for the review.

comment:5 by Julien Phalip <jphalip@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [f6fc83c97514ced9de48ca9ea442a9b166d3e211]:

Fixed #18409 -- Made RegexField work with unicode characters.

comment:6 by Julien Phalip <jphalip@…>, 12 years ago

In [314d82a94e2d4270b6ec8aa4b3fc2e8ebc404f08]:

Merge pull request #101 from jphalip/tickets/18409-regexfield-unicode

Fixed #18409 -- Made RegexField work with unicode characters.

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