aboutsummaryrefslogtreecommitdiff
path: root/libjava/scripts
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-11-04 15:08:18 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-11-04 15:08:18 +0000
commit1b38125a351762b5f269822d4af61c16f53a6ddc (patch)
tree7c4f49c9293c904df002c3dc133b0392c58ccd41 /libjava/scripts
parentd3585b76d63dd41df119b0118adb37dfe06867c0 (diff)
downloadgcc-1b38125a351762b5f269822d4af61c16f53a6ddc.zip
gcc-1b38125a351762b5f269822d4af61c16f53a6ddc.tar.gz
gcc-1b38125a351762b5f269822d4af61c16f53a6ddc.tar.bz2
PR libgcj/14358, libgcj/24552:
* gnu/gcj/convert/IOConverter.java: Regenerate aliases. Add aliases for 'euc_jp' and 'eucjp'. * scripts/encodings.pl: Recognize 'none', not 'NONE'. Include canonical names in output. (%map): Added UnicodeLittle and UnicodeBig. From-SVN: r106490
Diffstat (limited to 'libjava/scripts')
-rw-r--r--libjava/scripts/encodings.pl21
1 files changed, 17 insertions, 4 deletions
diff --git a/libjava/scripts/encodings.pl b/libjava/scripts/encodings.pl
index 5e802c1..9af1087 100644
--- a/libjava/scripts/encodings.pl
+++ b/libjava/scripts/encodings.pl
@@ -8,7 +8,9 @@
'ISO_8859-1:1987' => '8859_1',
'UTF-8' => 'UTF8',
'Shift_JIS' => 'SJIS',
- 'Extended_UNIX_Code_Packed_Format_for_Japanese' => 'EUCJIS'
+ 'Extended_UNIX_Code_Packed_Format_for_Japanese' => 'EUCJIS',
+ 'UTF16-LE' => 'UnicodeLittle',
+ 'UTF16-BE' => 'UnicodeBig'
);
if ($ARGV[0] eq '')
@@ -25,6 +27,12 @@ else
$file = $ARGV[0];
}
+# Include canonical names in the output.
+foreach $key (keys %map)
+{
+ $output{lc ($key)} = $map{$key};
+}
+
open (INPUT, "< $file") || die "couldn't open $file: $!";
$body = 0;
@@ -50,17 +58,22 @@ while (<INPUT>)
$current = $map{$name};
if ($current)
{
- print " hash.put (\"$lower\", \"$current\");\n";
+ $output{$lower} = $current;
}
}
elsif ($type eq 'Alias:')
{
# The IANA list has some ugliness.
- if ($name ne '' && $name ne 'NONE' && $current)
+ if ($name ne '' && $lower ne 'none' && $current)
{
- print " hash.put (\"$lower\", \"$current\");\n";
+ $output{$lower} = $current;
}
}
}
close (INPUT);
+
+foreach $key (sort keys %output)
+{
+ print " hash.put (\"$key\", \"$output{$key}\");\n";
+}