This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: strange behaviour of locale.getlocale() -> None, None
Type: Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: locale documentation doesn't mention that LC_CTYPE is changed at startup
View: 6203
Assigned To: Nosy List: alexis, feth, vstinner
Priority: normal Keywords:

Created on 2011-08-05 20:23 by feth, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg141683 - (view) Author: Feth AREZKI (feth) Date: 2011-08-05 20:23
Tested on linux arch & debian, freeBSD and MacOSX :

% python2.7
[...]
>>> import locale
>>> locale.getlocale()
(None, None)
>>> locale.getlocale(locale.LC_CTYPE)  #or any type
(None, None)

% python3.2
[...]
>>> import locale
>>> locale.getlocale()
('fr_FR', 'UTF-8')

We feel this is strange!
msg141828 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-08-09 15:46
It should be related to #6203.
History
Date User Action Args
2022-04-11 14:57:20adminsetgithub: 56908
2011-08-09 15:46:48vstinnersetnosy: + vstinner
messages: + msg141828
2011-08-05 21:34:37ned.deilysetstatus: open -> closed
resolution: duplicate
superseder: locale documentation doesn't mention that LC_CTYPE is changed at startup
stage: resolved
2011-08-05 20:23:11fethcreate