summaryrefslogtreecommitdiff
path: root/lib/termcap.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/termcap.pl')
-rw-r--r--lib/termcap.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/termcap.pl b/lib/termcap.pl
index e8f108df06..c36575aa45 100644
--- a/lib/termcap.pl
+++ b/lib/termcap.pl
@@ -63,6 +63,9 @@ sub Tgetent {
$entry = $1;
$_ = $2;
s/\\E/\033/g;
+ s/\\(200)/pack('c',0)/eg; # NUL character
+ s/\\(0\d\d)/pack('c',oct($1))/eg; # octal
+ s/\\(0x[0-9A-Fa-f][0-9A-Fa-f])/pack('c',hex($1))/eg; # hex
s/\\(\d\d\d)/pack('c',$1 & 0177)/eg;
s/\\n/\n/g;
s/\\r/\r/g;