From 5397d09e585a1938fb64bc9c5cd5daed1959eb90 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Wed, 4 May 2011 16:41:45 +0900 Subject: Adding upstream version 0.5.3 --- libwc/map/mk_ucs_isdigit_map.pl | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 libwc/map/mk_ucs_isdigit_map.pl (limited to 'libwc/map/mk_ucs_isdigit_map.pl') diff --git a/libwc/map/mk_ucs_isdigit_map.pl b/libwc/map/mk_ucs_isdigit_map.pl new file mode 100644 index 0000000..c67f645 --- /dev/null +++ b/libwc/map/mk_ucs_isdigit_map.pl @@ -0,0 +1,56 @@ + +open(MAP, "> ucs_isdigit.map"); +print MAP <) { + chop; + ($name, $class) = split; + + @cp = (); + + open(UCD, "< private/UnicodeData-4.1.0.txt"); + while() { + chop; + @entry = split(';'); + last if $entry[0] =~ m/.{5,}/; + if ($entry[2] eq $class) { + push (@cp, $entry[0]); + } + } + close UCD; + + @bs = (); + $last = -1; + $seq = -1; + for my $e (@cp) { + if (++$last != hex $e) { + $seq = $e; + $last = hex $e; + push (@bs, $seq); + } + $end{$seq} = $e; + } + $nobs = @bs; + + print MAP <