1 | #!/usr/bin/perl |
1 | #!/usr/bin/perl |
2 | |
2 | |
3 | open UNIDATA, "<", "www.unicode.org/Public/UNIDATA/UnicodeData.txt" |
3 | open UNIDATA, "<", "www.unicode.org/Public/UNIDATA/UnicodeData.txt" |
4 | or die "www.unicode.org/Public/UNIDATA/UnicodeData.txt: $!"; |
4 | or die "www.unicode.org/Public/UNIDATA/UnicodeData.txt: $!"; |
5 | my %docom = qw(initial | medial | final | isolated | compat | none |); |
5 | #my %docom = qw(initial | medial | final | isolated | compat | none |); #+ arabic |
|
|
6 | my %docom = qw(compat | none |); |
6 | |
7 | |
7 | while (<UNIDATA>) { |
8 | while (<UNIDATA>) { |
8 | my ($code, undef, $category, undef, undef, $decompose, undef) = split /;/; |
9 | my ($code, undef, $category, undef, undef, $decompose, undef) = split /;/; |
9 | |
10 | |
10 | push @cat_z, $code if $category =~ /^Z/; |
11 | push @cat_z, $code if $category =~ /^Z/; |