Fix for issue 6202

This commit is contained in:
Ronald Oussoren 2009-06-07 15:29:46 +00:00
parent 2cfca7977e
commit fe8a3d6eeb
2 changed files with 2 additions and 36 deletions

View file

@ -536,10 +536,8 @@ def resetlocale(category=LC_ALL):
"""
_setlocale(category, _build_localename(getdefaultlocale()))
if sys.platform in ('win32', 'darwin', 'mac'):
if sys.platform.startswith("win"):
# On Win32, this will return the ANSI code page
# On the Mac, it should return the system encoding;
# it might return "ascii" instead
def getpreferredencoding(do_setlocale = True):
"""Return the charset that the user is likely using."""
import _locale