[issue5562] Locale-based date formatting crashes on non-ASCII data

Antoine Pitrou report at bugs.python.org
Wed Mar 25 20:48:18 CET 2009


Antoine Pitrou <pitrou at free.fr> added the comment:

(if I explicitly set another encoding, it doesn't work however:

>>> locale.setlocale(locale.LC_TIME, "fr_FR.ISO-8859-1")
'fr_FR.ISO-8859-1'
>>> time.strftime("%B", (2009,2,1,0,0,0,0,0,0))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-3:
invalid data

)

----------

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


More information about the Python-bugs-list mailing list