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.

Author lemburg
Recipients eric.araujo, lemburg, loewis, pitrou, ubuntujenkins
Date 2010-04-12.08:19:30
SpamBayes Score 5.6385063e-11
Marked as misclassified No
Message-id <4BC2D7AD.4020201@egenix.com>
In-reply-to <1271023988.71.0.895984687077.issue8374@psf.upfronthosting.co.za>
Content
Martin v. Löwis wrote:
> 
> Martin v. Löwis <martin@v.loewis.de> added the comment:
> 
> getdefaultlocale is inherently unmaintainable, and shouldn't be used by applications. I wish it was removed from Python (but unfortunately, too many people got tricked into believing that it does something useful).

I disagree on that.

getdefaultlocale() provides a way to access the default locale
(and encoding) on a platform without requiring a call to
setlocale(LC_ALL, "") which would affect the currently running
application and is not thread-safe (just like most other locale
C APIs in the C lib).

getpreferredencoding() just provides encoding information. It doesn't
provide locale information, so I don't see how that could be used
as replacement for getdefaultlocale().

The table needed for normalizing the various locale strings used in
the LANG environment variable (and others) needs to be updated every
now and then, but that's natural for a resource that changes based
on what people use locales for in real life.

> That said, if anybody feels like updating the tables from the various data sources, please go ahead.

I last updated the table in 2008. Will do that again this week.
History
Date User Action Args
2010-04-12 08:19:33lemburgsetrecipients: + lemburg, loewis, pitrou, eric.araujo, ubuntujenkins
2010-04-12 08:19:31lemburglinkissue8374 messages
2010-04-12 08:19:30lemburgcreate