New submission from Alexander Belopolsky <belopol...@users.sourceforge.net>:
The following code: import locale, time locale.setlocale(locale.LC_ALL, "fr_FR.UTF-8") t = time.localtime() s = time.strftime('%c', t) time.strptime('%c', s) Raises ValueError: time data '%c' does not match format 'Mer 9 jui 16:14:46 2010' in any locale where month follows day in '%c' format. Note that attached C code works as expected on my OSX laptop. I wonder it it would make sense to call platform strptime where available? I wonder if platform support for strptime has improved since 2002 when _strptime.py was introduced. ---------- assignee: belopolsky components: Extension Modules files: strptime-locale-bug.c messages: 107413 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file17601/strptime-locale-bug.c _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8957> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com