#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 by , 13 years ago
comment:2 by , 13 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 , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
++1 for unicode. If test suite passes, go for it!
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Pull request: https://github.com/django/django/pull/101