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 loewis
Recipients Arfrever, ezio.melotti, georg.brandl, lemburg, loewis, ned.deily, pitrou, r.david.murray, vstinner
Date 2011-01-28.21:22:14
SpamBayes Score 6.47588e-12
Marked as misclassified No
Message-id <>
In-reply-to <>
>> That would be highly non-portable, and repeat the mistakes of
>> getdefaultlocale.
> You say that often, but I don't really know why. It's certainly portable
> between various Unix platforms, perhaps not Windows, but then i18n
> on Windows is a different story altogether.

No, it's absolutely not portable across Unix platforms. Looking at
LANG or LC_ALL does *not* allow you to infer the region name, or
the locale's character set. For example, using glibc, in some
installations, /etc/locale.alias is considered to map a value of LANG
to the final locale name. As an option, glibc also considers a
LOCALE_ALIAS_PATH that may point to a (colon-separated) path of
files to search for locale aliases.

Other systems may use other databases to map a locale name to locale

Unless you know exactly what version of C library is running on
a system, parsing environment variables yourself is doomed to fail.
Date User Action Args
2011-01-28 21:22:15loewissetrecipients: + loewis, lemburg, georg.brandl, pitrou, vstinner, ned.deily, ezio.melotti, Arfrever, r.david.murray
2011-01-28 21:22:14loewislinkissue6203 messages
2011-01-28 21:22:14loewiscreate