Message130667
| Author |
crosser |
| Recipients |
crosser, lemburg, loewis, nnnnnn |
| Date |
2011年03月12日.10:28:54 |
| SpamBayes Score |
3.319567e-14 |
| Marked as misclassified |
No |
| Message-id |
<1299925735.76.0.938436739322.issue6981@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I don't know if the solution suggested in the report is right, but I can confirm the the current logic of getdefaultlocale() produces wrong results.
I have
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE=ru_RU.UTF-8
LC_COLLATE=ru_RU.UTF-8
which means, according to the documentation, "Do everything in English, but recognize Russian words and sort according to Russian alphabet".
All other software honors that semantics, except Python that returns Russian as the overall default locale:
Python 2.7.1+ (r271:86832, Feb 24 2011, 15:00:15)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> print locale.getdefaultlocale()
('ru_RU', 'UTF8')
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年03月12日 10:28:55 | crosser | set | recipients:
+ crosser, lemburg, loewis, nnnnnn |
| 2011年03月12日 10:28:55 | crosser | set | messageid: <1299925735.76.0.938436739322.issue6981@psf.upfronthosting.co.za> |
| 2011年03月12日 10:28:55 | crosser | link | issue6981 messages |
| 2011年03月12日 10:28:54 | crosser | create |
|