[New-bugs-announce] [issue11679] readline interferes with characters beginning with byte \xe9

Thomas Kluyver report at bugs.python.org
Sat Mar 26 01:28:39 CET 2011


New submission from Thomas Kluyver <takowl at gmail.com>:

To replicate, in Python 3.1 on Linux (utf-8 console):

>>> print(chr(0x9000))
退

Copy and paste this character into the prompt. It appears correctly (as a Chinese character). Then:

>>> import readline
>>> readline.parse_and_bind('"\M-i":"    "')

Now try to paste the character again: it appears as "    ��"
 (four spaces, two unknown character symbols), and if you press return, you get a SyntaxError.

This happens with all characters beginning with \xe9: In UTF-8, that's 0x9000-0x9fff. If the terminal encoding is changed to cp1252, I'm told that the same thing can be achieved with é, which is \xe9 there.

----------
components: Unicode
messages: 132192
nosy: takluyver
priority: normal
severity: normal
status: open
title: readline interferes with characters beginning with byte \xe9
type: behavior
versions: Python 2.6, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11679>
_______________________________________


More information about the New-bugs-announce mailing list