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 jonathan-lp
Recipients SilentGhost, jonathan-lp, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
Date 2019-05-31.19:00:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559329214.05.0.914677827713.issue37111@roundup.psfhosted.org>
In-reply-to
Content
Thank you for your comments but this wasn't a question and I maintain this is a bug, or at least undesirable behaviour. I'd consider it a bug in my own software.

Reasoning:
* It's an inconsistent default with the logging to screen. This causes more complexity for users when their bug is intermittent.
* Despite your assertion, it's not documented anywhere on the logging docs (I did check before creating this bug when trying to figure out what's going on) - The word "utf" or "unicode" doesn't appear on the logging page, or any of the two tutorials, or the logging.handlers page. There's something in the cookbook but that's about BOM's.
* Much of the world's native characters won't log to ASCII

Per this page: https://docs.python.org/3/howto/unicode.html
"UTF-8 is one of the most commonly used encodings, and Python often defaults to using it."

> People have been using logging, on Windows, without problems, for years, often using utf-8 to encode their log files.
I'm afraid this line of reasoning is suffering from selection bias, cherry picking, confirmation bias, and probably some others too. Clearly people have had problems before because it was from one of those folks I took the solution.

Doing something as basic as logging unicode shouldn't require knowledge of "handlers" - that's failing "simple is better than complex".
History
Date User Action Args
2019-05-31 19:00:14jonathan-lpsetrecipients: + jonathan-lp, paul.moore, vinay.sajip, tim.golden, SilentGhost, zach.ware, steve.dower
2019-05-31 19:00:14jonathan-lpsetmessageid: <1559329214.05.0.914677827713.issue37111@roundup.psfhosted.org>
2019-05-31 19:00:14jonathan-lplinkissue37111 messages
2019-05-31 19:00:13jonathan-lpcreate