Message48010
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".
|
|
Date |
User |
Action |
Args |
2007-08-23 15:42:17 | admin | link | issue1166948 messages |
2007-08-23 15:42:17 | admin | create | |
|