Paul Moore <p.f.mo...@gmail.com> added the comment:

> User would like Python logging of Unicode characters to be consistent

It is consistent. The encoding of

    logging.basicConfig(filename='c:\\my_log.log')

is consistent with the encoding of

    open('c:\\my_log.log')

Both use the system default encoding, which is not UTF-8. There is some 
discussion going on right now, as to whether it *should* be, but it isn't, and 
I wouldn't consider changing the behaviour of loging *without* changing the 
behaviour of open() to be consistent.

Logging to the console is consistent with the standard IO streams, and it was 
PEP 528 (https://www.python.org/dev/peps/pep-0528/) that made that change - 
before that, the standard IO streams, and logging to the console, used the 
console codepage.

So, while I agree that the behaviour takes a bit of work to understand, it's 
not (IMO) inconsistent, nor is it (IMO) a bug.

----------

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

Reply via email to