Ezio Melotti <ezio.melo...@gmail.com> added the comment: 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). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9198> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com