[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English
Martin v. Löwis
report at bugs.python.org
Wed Jul 10 18:15:34 CEST 2013
Martin v. Löwis added the comment:
FWIW, I couldn't find any use of getdefaultlocale in any of the hg revisions (using hg grep) in
https://bitbucket.org/birkenfeld/sphinx/
Instead, it's (probably) docutils, which has this code:
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
# locale.getpreferredencoding([do_setlocale=True|False])
# has side-effects | might return a wrong guess.
# (cf. Update 1 in http://stackoverflow.com/questions/4082645/using-python-2-xs-locale-module-to-format-numbers-and-currency)
I find that quite unfortunate, since locale.getpreferredencoding() would have don the right thing (IMO).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18378>
_______________________________________
More information about the Python-bugs-list
mailing list