[issue5905] strptime fails in non-UTF locale
STINNER Victor
report at bugs.python.org
Thu Dec 8 13:45:15 CET 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Oh! I think that I understood the problem: if HAVE_WCSFTIME is not defined, timemodule.c uses strftime(), instead of wcsftime(), encode input format and decode the format. It uses UTF-8 to encode/decode, whereas the right encoding is the locale encoding. Attached patch should fix this issue.
@Antoine: Do you have any idea why HAVE_WCSFTIME was not defined?
wcsftime() is defined in <wchar.h> on Ubuntu. In configure, it is tested using AC_CHECK_FUNCS(wcsftime)
----------
components: +Unicode
keywords: +patch
resolution: invalid ->
status: closed -> open
Added file: http://bugs.python.org/file23881/tzname_encoding.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5905>
_______________________________________
More information about the Python-bugs-list
mailing list