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 doko
Recipients
Date 2005-03-20.13:11:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
locale.getdefaultencoding checks first LANGUAGE, then
the LC_* and LANG variables. Assume LANGUAGE is set to
en:de, and LANG to en_US.utf-8, then getdefaultencoding
returns the wrong encoding (ISO8859-1).

AFAIK, LANGUAGE is specific to gettext (GNU extension),
and IMO should not interfer with getting the correct
encoding.

This patch uses LANGUAGE as the choice with the lowest
priority, so the other variables to determine the
locale and encoding take precedence (LC_ALL, LC_CTYPE,
LANG).

There's another (minor) bug in the implementation:
LANGUAGE is honoured even if the default locale is "C".
History
Date User Action Args
2007-08-23 15:42:17adminlinkissue1166948 messages
2007-08-23 15:42:17admincreate