Imported Upstream version 0.63.0
[hcoop/debian/courier-authlib.git] / unicode / unicodefilter.pl
1
2 my $unicodes=shift;
3 my $testing_hook=shift;
4
5 my %unicodes;
6
7 grep ( $unicodes{lc($_)}=1, split (/,/, $unicodes));
8
9 while (<STDIN>)
10 {
11 if ($unicodes eq "" || $unicodes eq "yes")
12 {
13 print;
14 next;
15 }
16
17 my ($chset, $structname)=split (/[ \t\r\n]/, $_);
18
19 if ($unicodes eq "no")
20 {
21 next if $structname ne "unicode_ISO8859_1";
22 }
23 else
24 {
25 next unless $unicodes{lc($chset)}
26 || $structname eq "unicode_ISO8859_1";
27 }
28 print;
29 }
30
31 print "X-TEST\tunicode_XTEST\n" if $testing_hook eq "yes";