Message109620
I suggest to:
1) keep the current behavior for non-BMP chars (i.e. print them normally);
2) change isprintable to consider the Zx categories printable (this will affect repr() too);
3) change displayhook (*NOT* sys.stdout.encoding) to use backslashreplace when the string contains chars that are not encodable with sys.stdout.encoding *.
* note that this will affect only the objects that are converted with repr() in the interpreter e.g. ">>> x = 'foo'; x" and *NOT* ">>> x = 'foo'; print(x)". Since the first behavior exists *only* in the interactive interpreter it won't be inconsistent with normal programs ("x = 'foo'; x" in a program doesn't display anything). |
|
| Date |
User |
Action |
Args |
| 2010-07-08 22:16:02 | ezio.melotti | set | recipients:
+ ezio.melotti, lemburg, loewis, amaury.forgeotdarc, vstinner |
| 2010-07-08 22:16:02 | ezio.melotti | set | messageid: <[email protected]> |
| 2010-07-08 22:15:58 | ezio.melotti | link | issue9198 messages |
| 2010-07-08 22:15:57 | ezio.melotti | create | |
|