This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pwronisz
Recipients pwronisz, vinay.sajip
Date 2013-10-15.15:08:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za>
In-reply-to
Content
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/__init__.py:860: ufs = fs.decode(stream.encoding)

as Python can't really handle the following code:

fs = "%s\n"
print fs.decode('utf16') % u'foo'
History
Date User Action Args
2013-10-15 15:08:24pwroniszsetrecipients: + pwronisz, vinay.sajip
2013-10-15 15:08:24pwroniszsetmessageid: <1381849704.17.0.355561894294.issue19267@psf.upfronthosting.co.za>
2013-10-15 15:08:24pwroniszlinkissue19267 messages
2013-10-15 15:08:24pwroniszcreate