New submission from Paul Monson <paulm...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue36779>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to