(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.
This commit is contained in:
Ronald Oussoren 2011-05-17 13:03:54 +02:00
commit 6edd8c1faf
2 changed files with 4 additions and 1 deletions

View File

@ -643,7 +643,7 @@ locale_encoding_alias = {
'tactis': 'TACTIS', 'tactis': 'TACTIS',
'euc_jp': 'eucJP', 'euc_jp': 'eucJP',
'euc_kr': 'eucKR', 'euc_kr': 'eucKR',
'utf_8': 'UTF8', 'utf_8': 'UTF-8',
'koi8_r': 'KOI8-R', 'koi8_r': 'KOI8-R',
'koi8_u': 'KOI8-U', 'koi8_u': 'KOI8-U',
# XXX This list is still incomplete. If you know more # XXX This list is still incomplete. If you know more

View File

@ -698,6 +698,9 @@ Library
and a non-zero offset, and an attempt to read past the end of file is made 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. (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 - Issue #10684: shutil.move used to delete a folder on case insensitive
filesystems when the source and destination name where the same except filesystems when the source and destination name where the same except
for the case. for the case.