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
This commit is contained in:
parent
d3585b76d6
commit
1b38125a35
3 changed files with 57 additions and 28 deletions
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue