chiark / gitweb /
Commods (upload): report hex ord of nonprinting characters when rejecting
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 3 Apr 2016 21:37:37 +0000 (22:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 3 Apr 2016 21:37:37 +0000 (22:37 +0100)
yarrg/Commods.pm

index 4267034..48caf79 100644 (file)
@@ -422,7 +422,7 @@ sub check_tsv_line ($$) {
     
     chomp($l) or &$bad_data('missing end-of-line');
 
-    $l !~ m/\P{IsPrint}/ or &$bad_data('nonprinting char(s)');
+    $l !~ m/\P{IsPrint}/ or &$bad_data('nonprinting char(s) '.sprintf "%#x", ord $&);
     my @v= split /\t/, $l, -1;
     @v==6 or &$bad_data('wrong number of fields');
     $v[1] =~ s/^\s+//; $v[1] =~ s/\s+$//; # ooo don't check :-(