[New-bugs-announce] [issue22742] IDLE shows traceback when printing non-BMP character
Alexander Belopolsky
report at bugs.python.org
Mon Oct 27 17:18:24 CET 2014
New submission from Alexander Belopolsky:
>>> print("\N{ROCKET}")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
print("\N{ROCKET}")
File "idlelib/PyShell.py", line 1352, in write
return self.shell.write(s, self.tags)
UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001f680' in position 0: Non-BMP character not supported in Tk
Shouldn't IDLE replace non-encodable characters with "\uFFFD"?
I think
>>> "\N{ROCKET}"
�
is user-friendlier than the traceback.
See also #14304.
----------
components: Library (Lib)
messages: 230078
nosy: belopolsky
priority: normal
severity: normal
status: open
title: IDLE shows traceback when printing non-BMP character
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22742>
_______________________________________
More information about the New-bugs-announce
mailing list