[issue10466] locale.py throws exception on Windows / Non-UTF8 system
Sibylle Koczian
report at bugs.python.org
Sat Nov 20 12:36:07 CET 2010
New submission from Sibylle Koczian <nulla.epistola at web.de>:
Running locale.py as a module on Windows, using the Python command window, produces this output:
C:\Python31\Lib>locale.py
Locale aliasing:
Locale defaults as determined by getdefaultlocale():
------------------------------------------------------------------------
Language: de_DE
Encoding: cp1252
Locale settings on startup:
------------------------------------------------------------------------
LC_NUMERIC ...
Language: (undefined)
Encoding: (undefined)
LC_MONETARY ...
Language: (undefined)
Encoding: (undefined)
LC_COLLATE ...
Language: (undefined)
Encoding: (undefined)
LC_CTYPE ...
Language: (undefined)
Encoding: (undefined)
LC_TIME ...
Language: (undefined)
Encoding: (undefined)
Locale settings after calling resetlocale():
------------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python31\Lib\locale.py", line 1798, in <module>
_print_locale()
File "C:\Python31\Lib\locale.py", line 1761, in _print_locale
resetlocale()
File "C:\Python31\Lib\locale.py", line 537, in resetlocale
_setlocale(category, _build_localename(getdefaultlocale()))
locale.Error: unsupported locale setting
Tried with 2.7 on Windows XP, 32bit, 3.1.2 and 3.2a4 on Windows 7, 64bit. System character set in all cases cp1252 as usual for a German windows installation.
With 2.6, 2.6.5, 3.1.2 on Linux with UTF-8 system character set: no exception, expected output.
----------
components: Library (Lib)
messages: 121616
nosy: skoczian
priority: normal
severity: normal
status: open
title: locale.py throws exception on Windows / Non-UTF8 system
versions: Python 2.7, Python 3.1, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10466>
_______________________________________
More information about the Python-bugs-list
mailing list