[New-bugs-announce] [issue25664] Unexpected UnicodeDecodeError in logging module

Zephor Wu report at bugs.python.org
Thu Nov 19 00:36:22 EST 2015

New submission from Zephor Wu:

# coding=utf-8
import logging

logger = logging.getLogger(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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list