New submission from Paweł Wroniszewski:
I encountered the problem in logging module, but it is broader then that. Have
a look at the following code:
import time
DATE_FORMAT = '%d/%b/%Y %H:%M:%S%z %Z'
print(time.strftime(DATE_FORMAT))
print(time.strftime(DATE_FORMAT,time
Paweł Wroniszewski added the comment:
Cool - looks good to me as well. Thanks guys.
--
___
Python tracker
<http://bugs.python.org/issue19267>
___
___
Python-bug
Paweł Wroniszewski added the comment:
Btw I also don't see the purspose of fs.decode(stream.encoding), as it should
rather be encoded and not decoded...
--
___
Python tracker
<http://bugs.python.org/is
Paweł Wroniszewski added the comment:
Hi Victor. Your fix works, but actually using simply ufs='%s\n' also seem to
work, as
type( '%s' % u'foo')
and
type( u'%s' % u'foo')
returns the same - unicode.
So I would suggest dropping ufs completely
New submission from Paweł Wroniszewski:
The following code reproduces the error:
import logging
logging.root.addHandler(logging.FileHandler(filename='test.log',encoding='UTF16'))
logging.error( u'b\u0142\u0105d')
I think the problem is in the line
logging/__