summaryrefslogtreecommitdiff
path: root/libjava/scripts
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-04 15:08:18 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-04 15:08:18 +0000
commit027c209cb08a8e85a77ffe72e819a4855092cb85 (patch)
tree7c4f49c9293c904df002c3dc133b0392c58ccd41 /libjava/scripts
parentf655717d86cbacb8e8ef36df8de13e427820b7a1 (diff)
downloadgcc-027c209cb08a8e85a77ffe72e819a4855092cb85.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106490 138bc75d-0d04-0410-961f-82ee72b054a4
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 5e802c1f5fc..9af10876985 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";
+}