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 vstinner
Recipients vinay.sajip, vstinner, zephor
Date 2015-11-25.07:52:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448437947.9.0.404447093489.issue25664@psf.upfronthosting.co.za>
In-reply-to
Content
$ cat x.py 
# coding=utf-8
import logging
logging.basicConfig(format='%(name)s %(message)s')
logger = logging.getLogger(u'测试')
logger.error(u'测试')

$ python2.7 x.py 
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 474, in format
    s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128)
Logged from file x.py, line 8
History
Date User Action Args
2015-11-25 07:52:27vstinnersetrecipients: + vstinner, vinay.sajip, zephor
2015-11-25 07:52:27vstinnersetmessageid: <1448437947.9.0.404447093489.issue25664@psf.upfronthosting.co.za>
2015-11-25 07:52:27vstinnerlinkissue25664 messages
2015-11-25 07:52:27vstinnercreate