From 9acffced80482fb2ccc089fd881f027a7972e6b6 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 15 Dec 2000 05:53:39 +0000 Subject: Character.java: Updated UnicodeBlock constants. * java/lang/Character.java: Updated UnicodeBlock constants. * scripts/blocks.pl: Special case private use and surrogate areas. Updated URL. From-SVN: r38269 --- libjava/scripts/blocks.pl | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'libjava/scripts') diff --git a/libjava/scripts/blocks.pl b/libjava/scripts/blocks.pl index 4009671..9142a49 100644 --- a/libjava/scripts/blocks.pl +++ b/libjava/scripts/blocks.pl @@ -6,8 +6,7 @@ if ($ARGV[0] eq '') if (! -f $file) { # Too painful to figure out how to get Perl to do it. - # FIXME. - system 'wget -o .wget-log http://www.isi.edu/in-notes/iana/unidata/Blocks.txt'; + system 'wget -o .wget-log http://www.unicode.org/Public/UNIDATA/Blocks.txt'; } } else @@ -22,6 +21,7 @@ while () { next if /^#/; chop; + next if /^$/; ($start, $to, $text) = split (/; /); ($symbol = $text) =~ tr/a-z/A-Z/; @@ -30,6 +30,23 @@ while () # Special case for one of the SPECIALS. next if $start eq 'FEFF'; + # Special case some areas that our heuristic mishandles. + if ($symbol eq 'HIGH_SURROGATES') + { + $symbol = 'SURROGATES_AREA'; + $text = 'Surrogates Area'; + $to = 'DFFF'; + } + elsif ($symbol =~ /SURROGATES/) + { + next; + } + elsif ($symbol eq 'PRIVATE_USE') + { + $symbol .= '_AREA'; + $text = 'Private Use Area'; + } + printf " public static final UnicodeBlock %s = new UnicodeBlock (\"%s\", '\\u%s', '\\u%s');\n", $symbol, $text, $start, $to; -- cgit v1.1