Opened 5 years ago

Closed 5 years ago

Last modified 5 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:1 Changed 5 years ago by Julien Phalip

comment:2 Changed 5 years ago by Julien Phalip

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 Changed 5 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted

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

comment:4 Changed 5 years ago by Julien Phalip

Triage Stage: AcceptedReady for checkin

Cool! Thanks for the review.

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

Resolution: fixed
Status: newclosed

In [f6fc83c97514ced9de48ca9ea442a9b166d3e211]:

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

comment:6 Changed 5 years ago by Julien Phalip <jphalip@…>

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