]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix #10154 and #10090: locale normalizes the UTF-8 encoding to "UTF-8" instead of...
authorRonald Oussoren <ronaldoussoren@mac.com>
Tue, 17 May 2011 10:44:54 +0000 (12:44 +0200)
committerRonald Oussoren <ronaldoussoren@mac.com>
Tue, 17 May 2011 10:44:54 +0000 (12:44 +0200)
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
Misc/NEWS

index 8c44625e05f6bf461d109bef151f9cc8366413a0..a1283a3a1447033cbb8a27ace7853f8e1704cce5 100644 (file)
@@ -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
index f6eb63ed38892fe535893c1245055a0edc974929..8f994b9cee75e449f384a63cff72c2e860f6c02b 100644 (file)
--- 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.