From: minima Date: Tue, 5 Dec 2000 14:06:03 +0000 (+0000) Subject: clobber 0x80-0x9f in incoming data X-Git-Tag: R_1_45~7 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce732002f6913bef502e168460ea3cc688fa3d8b;p=spider.git clobber 0x80-0x9f in incoming data --- diff --git a/Changes b/Changes index 461f3697..04cd0134 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ where digits are the 'wrong' way round. 2. made default max days to search for spots 3 months. 3. added hex decodes for those pesky 'national' characters that aren't really in grepdbg and watchdbg. +4. decide that we are using Latin-1 and therefore characters 0x80-0x9f are +not allowed. 03Dec00======================================================================= 1. change grepdbg and watchdbg so that you can see a number of lines before the condx that you are looking for so:- diff --git a/perl/Msg.pm b/perl/Msg.pm index a8db1137..f4f013be 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -238,7 +238,7 @@ FINISH: while (@lines){ $msg = shift @lines; $msg =~ s/\%([2-9A-F][0-9A-F])/chr(hex($1))/eg; - $msg =~ s/[\x00-\x08\x0a-\x1f\x9b\x8e]/./g; # immutable CSI sequence + control characters + $msg =~ s/[\x00-\x08\x0a-\x1f\x80-\x9f]/./g; # immutable CSI sequence + control characters &{$conn->{rcvd_notification_proc}}($conn, $msg, $!); $! = 0; } diff --git a/perl/grepdbg b/perl/grepdbg index 5b95c633..a14bf301 100755 --- a/perl/grepdbg +++ b/perl/grepdbg @@ -62,7 +62,7 @@ for my $entry (@list) { shift @prev while @prev > $nolines; if ($line =~ m{$string}io) { for (@prev) { - $line =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; + s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; my @line = split '\^'; my $t = shift @line; print atime($t), ' ', join('^', @line), "\n";