Debian Codegraph @

scripts/atis/find_nonUTF8.pl

raw
1 #! /usr/bin/perl
2
3 my($content, $length);
4
5 open(FILE, "< airports.vlist") || die "Unable to open file small. <$!>\n";
6
7 while( chomp($content = <FILE>) ) {
8 $length = length($content);
9
10 for( $i = 0; $i < $length; $i++ ) {
11
12 if( ord(substr($content, $i, 1)) > 127 )
13 {
14 print "$content\n";
15 last;
16 }
17 }
18 }
19 close(FILE);
20
21 exit 0