[New-bugs-announce] [issue36779] strptime returns empty string on Windows if default codepage is a Unicode codepage
Paul Monson
report at bugs.python.org
Thu May 2 20:45:22 EDT 2019
New submission from Paul Monson <paulmons at gmail.com>:
Need to work around a CRT bug in the use of _tzset() + _tzname[]
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].
This causes time.tzname to be an empty string.
I have reported the bug.
One possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7
----------
messages: 341318
nosy: Paul Monson
priority: normal
severity: normal
status: open
title: strptime returns empty string on Windows if default codepage is a Unicode codepage
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36779>
_______________________________________
More information about the New-bugs-announce
mailing list