mirror of git://gcc.gnu.org/git/gcc.git
encodings.pl: Generate lower-case names.
* scripts/encodings.pl: Generate lower-case names. Updated URL for `character-sets' file. * gnu/gcj/convert/IOConverter.java (canonicalize): Convert name to lower case. Rebuilt list of aliases. From-SVN: r43566
This commit is contained in:
parent
23c108aff8
commit
c0aa72210a
|
|
@ -1,3 +1,11 @@
|
||||||
|
2001-06-25 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* scripts/encodings.pl: Generate lower-case names. Updated URL
|
||||||
|
for `character-sets' file.
|
||||||
|
* gnu/gcj/convert/IOConverter.java (canonicalize): Convert name to
|
||||||
|
lower case.
|
||||||
|
Rebuilt list of aliases.
|
||||||
|
|
||||||
2001-06-25 Tom Tromey <tromey@redhat.com>
|
2001-06-25 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* java/io/natFileDescriptorPosix.cc (open): Change error message
|
* java/io/natFileDescriptorPosix.cc (open): Change error message
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000 Free Software Foundation
|
/* Copyright (C) 2000, 2001 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
|
|
@ -29,33 +29,34 @@ public abstract class IOConverter
|
||||||
hash.put ("ISO-Latin-1", "8859_1");
|
hash.put ("ISO-Latin-1", "8859_1");
|
||||||
// All aliases after this point are automatically generated by the
|
// All aliases after this point are automatically generated by the
|
||||||
// `encodings.pl' script. Run it to make any corrections.
|
// `encodings.pl' script. Run it to make any corrections.
|
||||||
hash.put ("ANSI_X3.4-1968", "ASCII");
|
hash.put ("ansi_x3.4-1968", "ASCII");
|
||||||
hash.put ("iso-ir-6", "ASCII");
|
hash.put ("iso-ir-6", "ASCII");
|
||||||
hash.put ("ANSI_X3.4-1986", "ASCII");
|
hash.put ("ansi_x3.4-1986", "ASCII");
|
||||||
hash.put ("ISO_646.irv:1991", "ASCII");
|
hash.put ("iso_646.irv:1991", "ASCII");
|
||||||
hash.put ("ASCII", "ASCII");
|
hash.put ("ascii", "ASCII");
|
||||||
hash.put ("ISO646-US", "ASCII");
|
hash.put ("iso646-us", "ASCII");
|
||||||
hash.put ("US-ASCII", "ASCII");
|
hash.put ("us-ascii", "ASCII");
|
||||||
hash.put ("us", "ASCII");
|
hash.put ("us", "ASCII");
|
||||||
hash.put ("IBM367", "ASCII");
|
hash.put ("ibm367", "ASCII");
|
||||||
hash.put ("cp367", "ASCII");
|
hash.put ("cp367", "ASCII");
|
||||||
hash.put ("csASCII", "ASCII");
|
hash.put ("csascii", "ASCII");
|
||||||
hash.put ("ISO_8859-1:1987", "8859_1");
|
hash.put ("iso_8859-1:1987", "8859_1");
|
||||||
hash.put ("iso-ir-100", "8859_1");
|
hash.put ("iso-ir-100", "8859_1");
|
||||||
hash.put ("ISO_8859-1", "8859_1");
|
hash.put ("iso_8859-1", "8859_1");
|
||||||
hash.put ("ISO-8859-1", "8859_1");
|
hash.put ("iso-8859-1", "8859_1");
|
||||||
hash.put ("latin1", "8859_1");
|
hash.put ("latin1", "8859_1");
|
||||||
hash.put ("l1", "8859_1");
|
hash.put ("l1", "8859_1");
|
||||||
hash.put ("IBM819", "8859_1");
|
hash.put ("ibm819", "8859_1");
|
||||||
hash.put ("CP819", "8859_1");
|
hash.put ("cp819", "8859_1");
|
||||||
hash.put ("csISOLatin1", "8859_1");
|
hash.put ("csisolatin1", "8859_1");
|
||||||
hash.put ("UTF-8", "UTF8");
|
hash.put ("utf-8", "UTF8");
|
||||||
hash.put ("Shift_JIS", "SJIS");
|
hash.put ("none", "UTF8");
|
||||||
hash.put ("MS_Kanji", "SJIS");
|
hash.put ("shift_jis", "SJIS");
|
||||||
hash.put ("csShiftJIS", "SJIS");
|
hash.put ("ms_kanji", "SJIS");
|
||||||
hash.put ("Extended_UNIX_Code_Packed_Format_for_Japanese", "EUCJIS");
|
hash.put ("csshiftjis", "SJIS");
|
||||||
hash.put ("csEUCPkdFmtJapanese", "EUCJIS");
|
hash.put ("extended_unix_code_packed_format_for_japanese", "EUCJIS");
|
||||||
hash.put ("EUC-JP", "EUCJIS");
|
hash.put ("cseucpkdfmtjapanese", "EUCJIS");
|
||||||
|
hash.put ("euc-jp", "EUCJIS");
|
||||||
|
|
||||||
iconv_byte_swap = iconv_init ();
|
iconv_byte_swap = iconv_init ();
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +66,7 @@ public abstract class IOConverter
|
||||||
// Turn an alias into the canonical form.
|
// Turn an alias into the canonical form.
|
||||||
protected static final String canonicalize (String name)
|
protected static final String canonicalize (String name)
|
||||||
{
|
{
|
||||||
String c = (String) hash.get (name);
|
String c = (String) hash.get (name.toLowerCase ());
|
||||||
return c == null ? name : c;
|
return c == null ? name : c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ if ($ARGV[0] eq '')
|
||||||
if (! -f $file)
|
if (! -f $file)
|
||||||
{
|
{
|
||||||
# Too painful to figure out how to get Perl to do it.
|
# Too painful to figure out how to get Perl to do it.
|
||||||
system 'wget -o .wget-log http://www.isi.edu/in-notes/iana/assignments/character-sets';
|
system 'wget -o .wget-log http://www.iana.org/assignments/character-sets';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -42,12 +42,15 @@ while (<INPUT>)
|
||||||
}
|
}
|
||||||
|
|
||||||
($type, $name) = split (/\s+/);
|
($type, $name) = split (/\s+/);
|
||||||
|
# Encoding names are case-insensitive. We do all processing on
|
||||||
|
# the lower-case form.
|
||||||
|
my $lower = lc ($name);
|
||||||
if ($type eq 'Name:')
|
if ($type eq 'Name:')
|
||||||
{
|
{
|
||||||
$current = $map{$name};
|
$current = $map{$name};
|
||||||
if ($current)
|
if ($current)
|
||||||
{
|
{
|
||||||
print " hash.put (\"$name\", \"$current\");\n";
|
print " hash.put (\"$lower\", \"$current\");\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($type eq 'Alias:')
|
elsif ($type eq 'Alias:')
|
||||||
|
|
@ -55,7 +58,7 @@ while (<INPUT>)
|
||||||
# The IANA list has some ugliness.
|
# The IANA list has some ugliness.
|
||||||
if ($name ne '' && $name ne 'NONE' && $current)
|
if ($name ne '' && $name ne 'NONE' && $current)
|
||||||
{
|
{
|
||||||
print " hash.put (\"$name\", \"$current\");\n";
|
print " hash.put (\"$lower\", \"$current\");\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue