]> granicus.if.org Git - python/commitdiff
[Bug #790356] unctrl() doesn't work for full printable charset. Fix by Dave Cinege.
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 29 Aug 2003 18:40:03 +0000 (18:40 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 29 Aug 2003 18:40:03 +0000 (18:40 +0000)
Lib/curses/ascii.py

index b8ae6f326e121e81343d6edbf4b7127243530eee..08b5b79f5fd48f05c81dd80444ee567c33454e8d 100644 (file)
@@ -87,6 +87,8 @@ def alt(c):
         return _ctoi(c) | 0x80
 
 def unctrl(c):
+    if isprint(c):
+        return chr(_ctoi(c))
     bits = _ctoi(c)
     if bits == 0x7f:
         rep = "^?"