Issue #7080: locale.strxfrm() raises a MemoryError on 64-bit non-Windows
platforms, and assorted locale fixes by Derk Drukker.
diff --git a/Lib/locale.py b/Lib/locale.py
index b7aaa52..c50af53 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -578,14 +578,13 @@
# returning nothing will crash the
# interpreter.
result = 'UTF-8'
-
setlocale(LC_CTYPE, oldloc)
- return result
else:
result = nl_langinfo(CODESET)
if not result and sys.platform == 'darwin':
# See above for explanation
result = 'UTF-8'
+ return result
### Database