From 919adb4b57977d5e375dab0fa943b6e81fa145ab Mon Sep 17 00:00:00 2001 From: Ito Hiroyuki Date: Tue, 24 Aug 2010 10:11:51 +0000 Subject: [w3m-dev 04393] [patch] locale-related character management --- libwc/map/mk_ucs_case_map.pl | 48 + libwc/map/mk_ucs_isdigit_map.pl | 56 + libwc/map/ucs_case.map | 2600 +++++++++++++++++++++++++++++++++++++++ libwc/map/ucs_isalpha.map | 469 +++++++ libwc/map/ucs_isdigit.map | 30 + libwc/map/ucs_islower.map | 471 +++++++ libwc/map/ucs_isupper.map | 455 +++++++ 7 files changed, 4129 insertions(+) create mode 100644 libwc/map/mk_ucs_case_map.pl create mode 100644 libwc/map/mk_ucs_isdigit_map.pl create mode 100644 libwc/map/ucs_case.map create mode 100644 libwc/map/ucs_isalpha.map create mode 100644 libwc/map/ucs_isdigit.map create mode 100644 libwc/map/ucs_islower.map create mode 100644 libwc/map/ucs_isupper.map (limited to 'libwc/map') diff --git a/libwc/map/mk_ucs_case_map.pl b/libwc/map/mk_ucs_case_map.pl new file mode 100644 index 0000000..ee48826 --- /dev/null +++ b/libwc/map/mk_ucs_case_map.pl @@ -0,0 +1,48 @@ + +open(MAP, "> ucs_case.map"); +print MAP <) { + chop; + ($name, $col) = split; + + @cp = (); + + open(UCD, "< private/UnicodeData-4.1.0.txt"); + while() { + chop; + @entry = split(';'); + last if $entry[0] =~ m/.{5,}/; + if ($entry[$col] ne '') { + push (@cp, $entry[0]); + $map{$entry[0]} = $entry[$col]; + } + } + close UCD; + + $nocp = @cp; + + print 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 <