Message388238
> decoding the output of strftime("%Z") with PyUnicode_DecodeLocaleAndSize()
> works again since both agree on using the process active code page
At least it works as much as it ever did. It depends on the process active code page being compatible with the preferred UI language of the current process or thread. For example if the UI language is Japanese ('ja-JP') for the current user, but the process active code page is Latin 1252 (based on the system locale), then the result will be garbage. In that case, given the time-zone name is in Japanese, both LC_TIME and LC_CTYPE have to be changed to "ja-JP" in order to correctly encode (as tzname in ucrt), decode-encode (for strftime in ucrt) and finally decode again via PyUnicode_DecodeLocaleAndSize(). If Python switched back to using wcsftime() in Windows 10 2004+, then the current locale encoding would no longer be a problem for any UI language. |
|
Date |
User |
Action |
Args |
2021-03-07 13:06:17 | eryksun | set | recipients:
+ eryksun, belopolsky, pitrou, vstinner, ocean-city, jkloth, brian.curtin, python-dev |
2021-03-07 13:06:17 | eryksun | set | messageid: <1615122377.46.0.511695448962.issue10653@roundup.psfhosted.org> |
2021-03-07 13:06:17 | eryksun | link | issue10653 messages |
2021-03-07 13:06:17 | eryksun | create | |
|