Message130676
| Author |
sdaoden |
| Recipients |
crosser, eric.araujo, lemburg, loewis, nnnnnn, sdaoden |
| Date |
2011年03月12日.13:39:05 |
| SpamBayes Score |
2.9428747e-08 |
| Marked as misclassified |
No |
| Message-id |
<20110312133858.GA27948@sherwood.local> |
| In-reply-to |
<1299934448.74.0.63756219185.issue6981@psf.upfronthosting.co.za> |
| Content |
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! |
|