mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
[Bug #790356] unctrl() doesn't work for full printable charset. Fix by Dave Cinege.
This commit is contained in:
parent
e752e20605
commit
72cdb70296
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,8 @@ def alt(c):
|
||||||
return _ctoi(c) | 0x80
|
return _ctoi(c) | 0x80
|
||||||
|
|
||||||
def unctrl(c):
|
def unctrl(c):
|
||||||
|
if isprint(c):
|
||||||
|
return chr(_ctoi(c))
|
||||||
bits = _ctoi(c)
|
bits = _ctoi(c)
|
||||||
if bits == 0x7f:
|
if bits == 0x7f:
|
||||||
rep = "^?"
|
rep = "^?"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue