[issue25664] Unexpected UnicodeDecodeError in logging module

2015-11-24 Thread Zephor Wu
Zephor Wu added the comment: sorry, i forgot this: logging.basicConfig(format='%(name)s %(message)s') the error raised at the processing of the format while the name is 'utf-8' encoded and the message is an unicode -- ___ Python tracker <

[issue25664] Unexpected UnicodeDecodeError in logging module

2015-11-24 Thread Zephor Wu
Zephor Wu added the comment: here is the case, sorry again for just typing it before and not testing it myself :) # coding=utf-8 import logging logging.basicConfig(format='%(name)s %(message)s') logger = logging.getLogger(u'测试') logger.error(u'测试') btw, i'm using python2.7.10, mac osx

[issue25664] Unexpected UnicodeDecodeError in logging module

2015-11-18 Thread Zephor Wu
New submission from Zephor Wu: # coding=utf-8 import logging logger = logging.getLogger(u'测试') logger.error(u'测试') # these code will get an unexpected error # because getLogger encode the unicode to utf-8 while _log don't # see line 474 in logging/__init__.py # my suggestion is to keep

[issue25664] Unexpected UnicodeDecodeError in logging module

2015-11-18 Thread Zephor Wu
Changes by Zephor Wu <zep...@qq.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25664> ___ ___