[issue5905] strptime fails in non-UTF locale

2011-12-09 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue5905] strptime fails in non-UTF locale

2011-12-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8620e6901e58 by Victor Stinner in branch '3.2': Issue #5905: time.strftime() is now using the locale encoding, instead of http://hg.python.org/cpython/rev/8620e6901e58 New changeset bee7694988a4 by Victor Stinner in branch 'default': (Merge 3.2) Is

[issue5905] strptime fails in non-UTF locale

2011-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it seems defined here: $ grep HAVE_WCSFTIME pyconfig.h 1071:#define HAVE_WCSFTIME 1 > Attached patch should fix this issue. I'm sorry, I can't test the patch, because my Linux distro (Mageia) doesn't have the "fr_FR.ISO8859-15" locale anymore :-(

[issue5905] strptime fails in non-UTF locale

2011-12-08 Thread STINNER Victor
STINNER Victor 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. Atta

[issue5905] strptime fails in non-UTF locale

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: I close the issue because I am unable to reproduce it. -- resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue5905] strptime fails in non-UTF locale

2011-06-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Still a problem in 3.2.1 or 3.3? -- nosy: +terry.reedy versions: +Python 3.2, Python 3.3 -Python 3.1 ___ Python tracker ___

[issue5905] strptime fails in non-UTF locale

2010-08-12 Thread STINNER Victor
STINNER Victor added the comment: > I can't reproduce this on Windows ... This issue is (was?) maybe specific to Linux. -- ___ Python tracker ___ ___

[issue5905] strptime fails in non-UTF locale

2010-08-05 Thread Mark Lawrence
Mark Lawrence added the comment: I can't reproduce this on Windows Vista with 3.1 or 3.2 despite trying several Western & Eastern European, Chinese & Japanese locales. -- nosy: +BreamoreBoy ___ Python tracker

[issue5905] strptime fails in non-UTF locale

2010-01-21 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to reproduce the error. I tried locales fr_FR.iso88591 and fr_fr.iso885...@euro (fr...@euro), but the example works correctly. Should the terminal use the specified locale? My terminal uses fr_FR.utF8 locale. Should set_locale() be called before lo

[issue5905] strptime fails in non-UTF locale

2010-01-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The reason for this is that the strftime() C lib API is used to build localized month names. With your setting, you'll get French Latin-1 month names and those cannot be coerced to UTF-8 due to the accented characters in them. This works in Python 2.x sin

[issue5905] strptime fails in non-UTF locale

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, lemburg versions: -Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue5905] strptime fails in non-UTF locale

2009-05-02 Thread Antoine Pitrou
New submission from Antoine Pitrou : time.strptime() fails with non-UTF8 locales, *even when the input is totally ASCII*. >>> locale.setlocale(locale.LC_TIME, "fr_FR.ISO8859-15") 'fr_FR.ISO8859-15' >>> time.strptime("2009-01-01", "%Y-%m-%d") Traceback (most recent call last): File "", line 1,