[issue14200] Idle shell crash on printing non-BMP unicode character

Roger Serwy report at bugs.python.org
Sun Mar 11 22:44:06 CET 2012

Roger Serwy <roger.serwy at gmail.com> added the comment:

Attached is a patch to have the rpc marshal exceptions. When used with Martin's patch, IDLE returns 

>>> '\U00010330'
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
ValueError: character U+10330 is above the range (U+0000-U+FFFF) allowed by Tcl

Martin: I disagree with the approach of raising a UnicodeEncodeError if IDLE can't render the output of a user's program, especially when the program would otherwise run without error if ran from outside of IDLE.

Would replacing these characters with "?" and documenting this limitation in IDLE's docs be an acceptable solution?

Added file: http://bugs.python.org/file24788/rpc_marshal_exception.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list