[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding
STINNER Victor
report at bugs.python.org
Thu Oct 25 22:30:20 CEST 2012
STINNER Victor added the comment:
>I see in 3.3 PyUnicode_DecodeFSDefaultAndSize() was replaced
> by PyUnicode_DecodeLocale().
Related changes:
- 8620e6901e58 for the issue #5905
- 279b0aee0cfb for the issue #13560
I wrote 8620e6901e58 for Linux, when the wcsftime() function is missing.
The problem is the changeset 279b0aee0cfb: it introduces a regression on Windows. It looks like PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefault() use a different encoding on Windows.
I suppose that we need to add an #ifdef MS_WINDOWS to use PyUnicode_DecodeFSDefault() on Windows, and PyUnicode_DecodeFSDefault() on Linux.
See also the issue #10653: time.strftime() uses strftime() (bytes) instead of wcsftime() (unicode) on Windows, because wcsftime() and tzname format the timezone differently.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16322>
_______________________________________
More information about the Python-bugs-list
mailing list