
report at bugs
Jun 28, 2008, 3:35 PM
Post #4 of 11
(201 views)
Permalink
|
|
[issue2834] re.IGNORECASE not Unicode-ready
[In reply to]
|
|
Antoine Pitrou <pitrou[at]free.fr> added the comment: Le samedi 28 juin 2008 à 22:20 +0000, Guido van Rossum a écrit : > Finally, is there a use case of re.LOCALE any more? I'm thinking not. It's used for locale-specific case matching in the non-unicode case. But it looks to me like a bad practice and we could probably remove it. 'C' >>> re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE) >>> re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE |re.LOCALE) >>> locale.setlocale(locale.LC_CTYPE, 'fr_FR.ISO-8859-1') 'fr_FR.ISO-8859-1' >>> re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE) >>> re.match('À'.encode('latin1'), 'à'.encode('latin1'), re.IGNORECASE | re.LOCALE) <_sre.SRE_Match object at 0xb7b9ac28> _______________________________________ Python tracker <report[at]bugs.python.org> <http://bugs.python.org/issue2834> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|