Patches item #1166948, was opened at 2005-03-20 08:11 Message generated for change (Settings changed) made by tjreedy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1166948&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Library (Lib) Group: Python 2.4 Status: Closed >Resolution: Accepted Priority: 5 Submitted By: Matthias Klose (doko) Assigned to: Nobody/Anonymous (nobody) Summary: locale.getdefaultencoding: precedence of LANGUAGE / LANG Initial Comment: 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". ---------------------------------------------------------------------- Comment By: Matthias Klose (doko) Date: 2005-09-20 03:06 Message: Logged In: YES user_id=60903 checked in as Lib/locale.py: 1.32 (HEAD) Lib/locale.py: 1.28.4.2 (2.4 branch) ---------------------------------------------------------------------- Comment By: Reinhold Birkenfeld (birkenfeld) Date: 2005-06-01 13:04 Message: Logged In: YES user_id=1188172 This file is one big patch for #1166938, #1166948 and #1166957. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1166948&group_id=5470 _______________________________________________ Patches mailing list [email protected] http://mail.python.org/mailman/listinfo/patches
