[issue5903] strftime fails in non UTF-8 locale

Ezio Melotti report at bugs.python.org
Sat May 2 15:35:35 CEST 2009


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

Here the issue might be different though. Does 
$ LC_ALL=ru_RU.koi8-r python3.0 -c 'import time;time.strftime("%A")'
(without the print) work?

I don't have the ru_RU locale but here time.strftime() return 'str', not
'bytes' and the utf-8 codec should be able to encode it:
>>> time.strftime("%A")
'Saturday'
>>> type(_)
<class 'str'>

----------

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


More information about the Python-bugs-list mailing list