[issue29571] test_re is failing when local is set for `en_IN`

Nick Coghlan report at bugs.python.org
Sat Feb 18 03:54:00 EST 2017


Nick Coghlan added the comment:

Looking into this at the PyCon Pune sprints, the problem appears to be arising due to the following difference in behaviour when the unqualifed `en_IN` locale is set:

$ LANG=en_IN.UTF-8 python3 -c "import locale; print(locale.getlocale(locale.LC_CTYPE), locale.getpreferredencoding(False), sep='\n')"
('en_IN', 'UTF-8')
UTF-8

$ LANG=en_IN python3 -c "import locale; print(locale.getlocale(locale.LC_CTYPE), locale.getpreferredencoding(False), sep='\n')"
('en_IN', 'ISO8859-1')                                                                                                       
UTF-8

re.LOCALE is presumably picking up the "UTF-8" rather than the "ISO8859-1", and hence the test is failing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29571>
_______________________________________


More information about the Python-bugs-list mailing list