mirror of
https://github.com/python/cpython.git
synced 2025-10-25 07:48:51 +00:00
Encode unicode strings to the terminal encoding with backslashreplace error (as Python does for sys.stderr) before writing them to sys.stdout. It fixes UnicodeEncodeError on writing non-ascii characters in an ascii terminal (C locale: ASCII encoding). |
||
|---|---|---|
| .. | ||
| libpython.py | ||