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 the encoding in logging same with python2 with 
unicode

----------
components: Library (Lib)
messages: 254881
nosy: zephor
priority: normal
severity: normal
status: open
title: Unexpected UnicodeDecodeError in logging module
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25664>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to