Code

Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#18409 closed Bug (fixed)

Make RegexField work with unicode characters

Reported by: julien 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?

Attachments (0)

Change History (6)

comment:2 Changed 23 months ago by julien

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 23 months ago by claudep

  • Triage Stage changed from Unreviewed to Accepted

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

comment:4 Changed 23 months ago by julien

  • Triage Stage changed from Accepted to Ready for checkin

Cool! Thanks for the review.

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

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

In [f6fc83c97514ced9de48ca9ea442a9b166d3e211]:

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

comment:6 Changed 23 months 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.

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.