STINNER Victor added the comment:

> Before importing the io module sys.stderr is stdprinter. It always encodes 
> written string to UTF-8. Proposed patch makes it to use the backslashreplace 
> error handler.

I like this solution. stdprinter is supposed to be replaced quickly.

But we may need something else to escape non-encodable characters in the 
filename when sys.stdout is a TextIOWrapper using the strict error handler.

----------
nosy: +haypo

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

Reply via email to