Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment: On Sat, Mar 12, 2011 at 12:54:08PM +0000, Eugene Crosser wrote: > Steffen: can you please be more specific?
I can't, dear Eugene, because you are completely right and i am completely wrong. > I believe that the correct "guessing order" [...] Well, thank you ... but it would have been better for me to go to the kitchen and drink a cup of nice tea before my post! > I believe that because LC_CTYPE controls only one specific aspect > of the locale, it either should not be used at all, or used only > as the last resort when locale cannot be determined from LANG or > LANGUAGE. I think that the current search order > "envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')" is wrong I really agree with you. Except for LC_ALL and LANG (and LANGUAGE, but this is non-standart for C; it seem to have been pushed forward by the GNU people and is documented by Python, however) nothing should be part of the evaluation of a getdefaultlocale(). (I am personally not so sure about that getdefaultlocale() at all. That is, whereas i *may* understand the existence of a locale.getpreferredencoding() (but with different semantics as in #11022 but that's not of interest here), because you need to setup your I/O layer so that it works in the system's environment anyway, i personally think that getdefaultlocale() is too much. I.e. getdefaultlocale() behaves as if setlocale() has been used but without setlocale() being used yet. This is a fine hint for an application that wants to use the users locale settings without using the users locale settings! Just do a grep(1) on Lib/ ...) Thanks once again for your kindness! ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6981> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com