[Python-checkins] cpython (merge 3.1 -> 3.2): (merge) Fix #10154 and #10090: locale normalizes the UTF-8 encoding to "UTF-8"
ronald.oussoren
python-checkins at python.org
Tue May 17 14:10:13 CEST 2011
http://hg.python.org/cpython/rev/454d13e535ff
changeset: 70173:454d13e535ff
branch: 3.2
parent: 70163:43cbfacae463
parent: 70172:28e410eb86af
user: Ronald Oussoren <ronaldoussoren at mac.com>
date: Tue May 17 13:03:54 2011 +0200
summary:
(merge) 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.
files:
Lib/locale.py | 2 +-
Misc/NEWS | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Lib/locale.py b/Lib/locale.py
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -643,7 +643,7 @@
'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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -698,6 +698,9 @@
and a non-zero offset, and an attempt to read past the end of file is made
(IndexError is raised instead). Patch by Ross Lagerwall.
+- 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 #10684: shutil.move used to delete a folder on case insensitive
filesystems when the source and destination name where the same except
for the case.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list