Imported Upstream version 0.66.1
[hcoop/debian/courier-authlib.git] / libs / unicode / unicodefilter.pl
CommitLineData
8d138742
CE
1
2my $unicodes=shift;
3my $testing_hook=shift;
4
5my %unicodes;
6
7grep ( $unicodes{lc($_)}=1, split (/,/, $unicodes));
8
9while (<STDIN>)
10{
11 if ($unicodes eq "" || $unicodes eq "yes")
12 {
13 print;
14 next;
15 }
16
17my ($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
31print "X-TEST\tunicode_XTEST\n" if $testing_hook eq "yes";