[issue10653] test_time test_strptime fails on windows

Hirokazu Yamamoto report at bugs.python.org
Thu Dec 9 11:54:40 CET 2010


Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp> added the comment:

> 1.  Decoding the output of wcsftime().  Python expects mbcs (which
> I believe is an UTF16-like wide char encoding) while Windows
> apparently puts cp932 there in your locale.  I don't have expertise
> to address this issue.

No, mbcs is not wide character sets (wchar_t*) but ANSI character sets
(char*). In my environment, mbcs == cp932. And python expects UTF-16. 

> 2. strptime() cannot parse strftime() output when strftime('%Z') is
> different from time.tzname[dst]. (snip)

I attached test program to test behavior of strftime and wcsftime
on locale. On VC6, strftime doesn't depend on locale, wheres
wcsftime changed the value depends on locale. (I tested only "C"
locale and "System" locale because I could not find other
locales working on my environment, so )

If strftime doesn't depend on locale and equals to tzname
for every locale, maybe strftime is preferred on windows.

# Can somebody test this on VS9? And other locales?

----------
Added file: http://bugs.python.org/file19986/main.c

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10653>
_______________________________________


More information about the Python-bugs-list mailing list