From 02a67ac72be5adb37431b18c3f4b7cb060be6e16 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 17 May 2011 12:44:54 +0200 Subject: Fix #10154 and #10090: locale normalizes the UTF-8 encoding to "UTF-8" instead of "UTF8" On MacOSX and OpenBSD (and possibly other BSDs) "en_US.UTF-8" is a valid locale while "en_US.UTF8" is not. As the former works on Linux as well it is better to normalize to that value. --- Lib/locale.py | 2 +- Misc/NEWS | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/locale.py b/Lib/locale.py index 8c44625..a1283a3 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -640,7 +640,7 @@ locale_encoding_alias = { 'tactis': 'TACTIS', 'euc_jp': 'eucJP', 'euc_kr': 'eucKR', - 'utf_8': 'UTF8', + 'utf_8': 'UTF-8', 'koi8_r': 'KOI8-R', 'koi8_u': 'KOI8-U', # XXX This list is still incomplete. If you know more diff --git a/Misc/NEWS b/Misc/NEWS index f6eb63e..8f994b9 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -72,6 +72,9 @@ Core and Builtins Library ------- +- Issue #10154, #10090: change the normalization of UTF-8 to "UTF-8" instead + of "UTF8" in the locale module as the latter is not supported MacOSX and OpenBSD. + - Issue #10756: atexit normalizes the exception before displaying it. Patch by Andreas Stührk. -- cgit v0.12