[issue8304] time.strftime() and Unicode characters on Windows

2021-03-08 Thread Eryk Sun
Eryk Sun added the comment: > I'm not sure of what you mean. The function is implemented: My comment was limited to Windows, for which time.tzset() has never been implemented. Since Python has its own implementation of time.tzname in Windows, it should also implement time.tzset() to allow

[issue8304] time.strftime() and Unicode characters on Windows

2021-03-08 Thread STINNER Victor
STINNER Victor added the comment: > time.tzset() should be implemented I'm not sure of what you mean. The function is implemented: static PyObject * time_tzset(PyObject *self, PyObject *unused) { PyObject* m; m = PyImport_ImportModuleNoBlock("time"); if (m == NULL) {

[issue8304] time.strftime() and Unicode characters on Windows

2021-03-07 Thread Eryk Sun
Eryk Sun added the comment: Update since msg255133: Python 3.8+ now calls setlocale(LC_CTYPE, "") at startup in Windows, as 3.x has always done in POSIX. So decoding the output of C strftime("%Z") with PyUnicode_DecodeLocaleAndSize() 'works' again, since both default to the process code

[issue8304] time.strftime() and Unicode characters on Windows

2019-02-24 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8304] time.strftime() and Unicode characters on Windows

2015-11-22 Thread Eryk Sun
Eryk Sun added the comment: The problem from issue 10653 is that internally the CRT encodes the time zone name using the ANSI codepage (i.e. the default system codepage). wcsftime decodes this string using mbstowcs (i.e. multibyte string to wide-character string), which uses Latin-1 in the C

[issue8304] time.strftime() and Unicode characters on Windows

2015-11-20 Thread Takayuki SHIMIZUKAWA
Takayuki SHIMIZUKAWA added the comment: I've implemented a workaround for Sphinx: >>> time.strftime(u'%Y 年'.encode('unicode-escape').decode(), >>> *args).encode().decode('unicode-escape') 2015 年 https://github.com/sphinx-doc/sphinx/blob/8ae43b9fd/sphinx/util/osutil.py#L175 -- nosy:

[issue8304] time.strftime() and Unicode characters on Windows

2015-09-24 Thread Mark Lawrence
Mark Lawrence added the comment: @Alexander what is you take on this please? I can confirm that it is still a problem on Windows in 3.5.0. -- nosy: +belopolsky ___ Python tracker

[issue8304] time.strftime() and Unicode characters on Windows

2015-09-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, I am no expert on Windows. I believe Victor is most knowledgable in this area. -- ___ Python tracker ___

[issue8304] time.strftime() and Unicode characters on Windows

2015-09-24 Thread Eric V. Smith
Eric V. Smith added the comment: The problem is definitely that: format = PyUnicode_EncodeLocale(format_arg, "surrogateescape"); fails on Windows. Windows is using strftime, not wcsftime. It's not using wcsftime because of issue 10653. If I force Windows to use wcsftime, this particular

[issue8304] time.strftime() and Unicode characters on Windows

2014-09-30 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: strftime and Unicode characters - time.strftime() and Unicode characters on Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304