Commit 0e5a41b
Victor Stinner
libpython.py: py-bt commands escape unencodable characters
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).1 parent 6961bd6 commit 0e5a41b
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
1360 | 1367 | | |
1361 | 1368 | | |
1362 | 1369 | | |
1363 | | - | |
| 1370 | + | |
| 1371 | + | |
1364 | 1372 | | |
1365 | 1373 | | |
1366 | 1374 | | |
| |||
0 commit comments