Commit cb524e09 authored by Alexandre Julliard's avatar Alexandre Julliard

unicode: Remove some codepages that don't exist on Windows.

parent 09d97e96
...@@ -15,7 +15,6 @@ C_SRCS = \ ...@@ -15,7 +15,6 @@ C_SRCS = \
c_10017.c \ c_10017.c \
c_10021.c \ c_10021.c \
c_10029.c \ c_10029.c \
c_1006.c \
c_10079.c \ c_10079.c \
c_10081.c \ c_10081.c \
c_10082.c \ c_10082.c \
...@@ -43,13 +42,8 @@ C_SRCS = \ ...@@ -43,13 +42,8 @@ C_SRCS = \
c_28597.c \ c_28597.c \
c_28598.c \ c_28598.c \
c_28599.c \ c_28599.c \
c_28600.c \
c_28601.c \
c_28603.c \ c_28603.c \
c_28604.c \
c_28605.c \ c_28605.c \
c_28606.c \
c_424.c \
c_437.c \ c_437.c \
c_500.c \ c_500.c \
c_737.c \ c_737.c \
...@@ -57,7 +51,6 @@ C_SRCS = \ ...@@ -57,7 +51,6 @@ C_SRCS = \
c_850.c \ c_850.c \
c_852.c \ c_852.c \
c_855.c \ c_855.c \
c_856.c \
c_857.c \ c_857.c \
c_860.c \ c_860.c \
c_861.c \ c_861.c \
...@@ -69,7 +62,6 @@ C_SRCS = \ ...@@ -69,7 +62,6 @@ C_SRCS = \
c_869.c \ c_869.c \
c_874.c \ c_874.c \
c_875.c \ c_875.c \
c_878.c \
c_932.c \ c_932.c \
c_936.c \ c_936.c \
c_949.c \ c_949.c \
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
/* Everything below this line is generated automatically by make_unicode */ /* Everything below this line is generated automatically by make_unicode */
/* ### cpmap begin ### */ /* ### cpmap begin ### */
extern union cptable cptable_037; extern union cptable cptable_037;
extern union cptable cptable_424;
extern union cptable cptable_437; extern union cptable cptable_437;
extern union cptable cptable_500; extern union cptable cptable_500;
extern union cptable cptable_737; extern union cptable cptable_737;
...@@ -33,7 +32,6 @@ extern union cptable cptable_775; ...@@ -33,7 +32,6 @@ extern union cptable cptable_775;
extern union cptable cptable_850; extern union cptable cptable_850;
extern union cptable cptable_852; extern union cptable cptable_852;
extern union cptable cptable_855; extern union cptable cptable_855;
extern union cptable cptable_856;
extern union cptable cptable_857; extern union cptable cptable_857;
extern union cptable cptable_860; extern union cptable cptable_860;
extern union cptable cptable_861; extern union cptable cptable_861;
...@@ -45,12 +43,10 @@ extern union cptable cptable_866; ...@@ -45,12 +43,10 @@ extern union cptable cptable_866;
extern union cptable cptable_869; extern union cptable cptable_869;
extern union cptable cptable_874; extern union cptable cptable_874;
extern union cptable cptable_875; extern union cptable cptable_875;
extern union cptable cptable_878;
extern union cptable cptable_932; extern union cptable cptable_932;
extern union cptable cptable_936; extern union cptable cptable_936;
extern union cptable cptable_949; extern union cptable cptable_949;
extern union cptable cptable_950; extern union cptable cptable_950;
extern union cptable cptable_1006;
extern union cptable cptable_1026; extern union cptable cptable_1026;
extern union cptable cptable_1250; extern union cptable cptable_1250;
extern union cptable cptable_1251; extern union cptable cptable_1251;
...@@ -91,17 +87,12 @@ extern union cptable cptable_28596; ...@@ -91,17 +87,12 @@ extern union cptable cptable_28596;
extern union cptable cptable_28597; extern union cptable cptable_28597;
extern union cptable cptable_28598; extern union cptable cptable_28598;
extern union cptable cptable_28599; extern union cptable cptable_28599;
extern union cptable cptable_28600;
extern union cptable cptable_28601;
extern union cptable cptable_28603; extern union cptable cptable_28603;
extern union cptable cptable_28604;
extern union cptable cptable_28605; extern union cptable cptable_28605;
extern union cptable cptable_28606;
static const union cptable * const cptables[73] = static const union cptable * const cptables[65] =
{ {
&cptable_037, &cptable_037,
&cptable_424,
&cptable_437, &cptable_437,
&cptable_500, &cptable_500,
&cptable_737, &cptable_737,
...@@ -109,7 +100,6 @@ static const union cptable * const cptables[73] = ...@@ -109,7 +100,6 @@ static const union cptable * const cptables[73] =
&cptable_850, &cptable_850,
&cptable_852, &cptable_852,
&cptable_855, &cptable_855,
&cptable_856,
&cptable_857, &cptable_857,
&cptable_860, &cptable_860,
&cptable_861, &cptable_861,
...@@ -121,12 +111,10 @@ static const union cptable * const cptables[73] = ...@@ -121,12 +111,10 @@ static const union cptable * const cptables[73] =
&cptable_869, &cptable_869,
&cptable_874, &cptable_874,
&cptable_875, &cptable_875,
&cptable_878,
&cptable_932, &cptable_932,
&cptable_936, &cptable_936,
&cptable_949, &cptable_949,
&cptable_950, &cptable_950,
&cptable_1006,
&cptable_1026, &cptable_1026,
&cptable_1250, &cptable_1250,
&cptable_1251, &cptable_1251,
...@@ -167,12 +155,8 @@ static const union cptable * const cptables[73] = ...@@ -167,12 +155,8 @@ static const union cptable * const cptables[73] =
&cptable_28597, &cptable_28597,
&cptable_28598, &cptable_28598,
&cptable_28599, &cptable_28599,
&cptable_28600,
&cptable_28601,
&cptable_28603, &cptable_28603,
&cptable_28604,
&cptable_28605, &cptable_28605,
&cptable_28606,
}; };
/* ### cpmap end ### */ /* ### cpmap end ### */
/* Everything above this line is generated automatically by make_unicode */ /* Everything above this line is generated automatically by make_unicode */
......
...@@ -765,7 +765,6 @@ HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{6BF52A52-394A-11d3-B1 ...@@ -765,7 +765,6 @@ HKLM,SOFTWARE\Microsoft\Active Setup\Installed Components\{6BF52A52-394A-11d3-B1
[Nls] [Nls]
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"37",,"c_037.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"37",,"c_037.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"424",,"c_424.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"437",,"c_437.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"437",,"c_437.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"500",,"c_500.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"500",,"c_500.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"737",,"c_737.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"737",,"c_737.nls"
...@@ -773,7 +772,6 @@ HKLM,System\CurrentControlSet\Control\Nls\Codepage,"775",,"c_775.nls" ...@@ -773,7 +772,6 @@ HKLM,System\CurrentControlSet\Control\Nls\Codepage,"775",,"c_775.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"850",,"c_850.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"850",,"c_850.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"852",,"c_852.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"852",,"c_852.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"855",,"c_855.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"855",,"c_855.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"856",,"c_856.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"857",,"c_857.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"857",,"c_857.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"860",,"c_860.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"860",,"c_860.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"861",,"c_861.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"861",,"c_861.nls"
...@@ -785,12 +783,10 @@ HKLM,System\CurrentControlSet\Control\Nls\Codepage,"866",,"c_866.nls" ...@@ -785,12 +783,10 @@ HKLM,System\CurrentControlSet\Control\Nls\Codepage,"866",,"c_866.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"869",,"c_869.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"869",,"c_869.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"874",,"c_874.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"874",,"c_874.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"875",,"c_875.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"875",,"c_875.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"878",,"c_878.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"932",,"c_932.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"932",,"c_932.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"936",,"c_936.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"936",,"c_936.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"949",,"c_949.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"949",,"c_949.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"950",,"c_950.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"950",,"c_950.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"1006",,"c_1006.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"1026",,"c_1026.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"1026",,"c_1026.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"1250",,"c_1250.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"1250",,"c_1250.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"1251",,"c_1251.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"1251",,"c_1251.nls"
...@@ -831,12 +827,8 @@ HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28596",,"c_28596.nls" ...@@ -831,12 +827,8 @@ HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28596",,"c_28596.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28597",,"c_28597.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28597",,"c_28597.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28598",,"c_28598.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28598",,"c_28598.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28599",,"c_28599.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28599",,"c_28599.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28600",,"c_28600.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28601",,"c_28601.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28603",,"c_28603.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28603",,"c_28603.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28604",,"c_28604.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28605",,"c_28605.nls" HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28605",,"c_28605.nls"
HKLM,System\CurrentControlSet\Control\Nls\Codepage,"28606",,"c_28606.nls"
HKLM,System\CurrentControlSet\Control\Nls\Language,"0401",,"l_intl.nls" HKLM,System\CurrentControlSet\Control\Nls\Language,"0401",,"l_intl.nls"
HKLM,System\CurrentControlSet\Control\Nls\Language,"0402",,"l_intl.nls" HKLM,System\CurrentControlSet\Control\Nls\Language,"0402",,"l_intl.nls"
......
...@@ -35,16 +35,12 @@ my $SORTKEYS = "tr10/allkeys.txt"; ...@@ -35,16 +35,12 @@ my $SORTKEYS = "tr10/allkeys.txt";
# RFC3454 (stringprep data) # RFC3454 (stringprep data)
my $STRINGPREP = "rfc3454.txt"; my $STRINGPREP = "rfc3454.txt";
# Defaults mapping
my $DEFAULTS = "tools/unicode-defaults";
# Default char for undefined mappings # Default char for undefined mappings
my $DEF_CHAR = ord '?'; my $DEF_CHAR = ord '?';
my @allfiles = my @allfiles =
( (
[ 37, "CodpageFiles/037.txt", "IBM EBCDIC US Canada" ], [ 37, "CodpageFiles/037.txt", "IBM EBCDIC US Canada" ],
[ 424, "VENDORS/MISC/CP424.TXT", "IBM EBCDIC Hebrew" ],
[ 437, "CodpageFiles/437.txt", "OEM United States" ], [ 437, "CodpageFiles/437.txt", "OEM United States" ],
[ 500, "CodpageFiles/500.txt", "IBM EBCDIC International" ], [ 500, "CodpageFiles/500.txt", "IBM EBCDIC International" ],
[ 737, "CodpageFiles/737.txt", "OEM Greek 437G" ], [ 737, "CodpageFiles/737.txt", "OEM Greek 437G" ],
...@@ -52,7 +48,6 @@ my @allfiles = ...@@ -52,7 +48,6 @@ my @allfiles =
[ 850, "CodpageFiles/850.txt", "OEM Multilingual Latin 1" ], [ 850, "CodpageFiles/850.txt", "OEM Multilingual Latin 1" ],
[ 852, "CodpageFiles/852.txt", "OEM Slovak Latin 2" ], [ 852, "CodpageFiles/852.txt", "OEM Slovak Latin 2" ],
[ 855, "CodpageFiles/855.txt", "OEM Cyrillic" ], [ 855, "CodpageFiles/855.txt", "OEM Cyrillic" ],
[ 856, "VENDORS/MISC/CP856.TXT", "Hebrew PC" ],
[ 857, "CodpageFiles/857.txt", "OEM Turkish" ], [ 857, "CodpageFiles/857.txt", "OEM Turkish" ],
[ 860, "CodpageFiles/860.txt", "OEM Portuguese" ], [ 860, "CodpageFiles/860.txt", "OEM Portuguese" ],
[ 861, "CodpageFiles/861.txt", "OEM Icelandic" ], [ 861, "CodpageFiles/861.txt", "OEM Icelandic" ],
...@@ -64,12 +59,10 @@ my @allfiles = ...@@ -64,12 +59,10 @@ my @allfiles =
[ 869, "CodpageFiles/869.txt", "OEM Greek" ], [ 869, "CodpageFiles/869.txt", "OEM Greek" ],
[ 874, "CodpageFiles/874.txt", "ANSI/OEM Thai" ], [ 874, "CodpageFiles/874.txt", "ANSI/OEM Thai" ],
[ 875, "CodpageFiles/875.txt", "IBM EBCDIC Greek" ], [ 875, "CodpageFiles/875.txt", "IBM EBCDIC Greek" ],
[ 878, "VENDORS/MISC/KOI8-R.TXT", "Russian KOI8" ],
[ 932, "CodpageFiles/932.txt", "ANSI/OEM Japanese Shift-JIS" ], [ 932, "CodpageFiles/932.txt", "ANSI/OEM Japanese Shift-JIS" ],
[ 936, "CodpageFiles/936.txt", "ANSI/OEM Simplified Chinese GBK" ], [ 936, "CodpageFiles/936.txt", "ANSI/OEM Simplified Chinese GBK" ],
[ 949, "CodpageFiles/949.txt", "ANSI/OEM Korean Unified Hangul" ], [ 949, "CodpageFiles/949.txt", "ANSI/OEM Korean Unified Hangul" ],
[ 950, "CodpageFiles/950.txt", "ANSI/OEM Traditional Chinese Big5" ], [ 950, "CodpageFiles/950.txt", "ANSI/OEM Traditional Chinese Big5" ],
[ 1006, "VENDORS/MISC/CP1006.TXT", "IBM Arabic" ],
[ 1026, "CodpageFiles/1026.txt", "IBM EBCDIC Latin 5 Turkish" ], [ 1026, "CodpageFiles/1026.txt", "IBM EBCDIC Latin 5 Turkish" ],
[ 1250, "CodpageFiles/1250.txt", "ANSI Eastern Europe" ], [ 1250, "CodpageFiles/1250.txt", "ANSI Eastern Europe" ],
[ 1251, "CodpageFiles/1251.txt", "ANSI Cyrillic" ], [ 1251, "CodpageFiles/1251.txt", "ANSI Cyrillic" ],
...@@ -110,12 +103,8 @@ my @allfiles = ...@@ -110,12 +103,8 @@ my @allfiles =
[ 28597, "CodpageFiles/28597.txt", "ISO 8859-7 Greek" ], [ 28597, "CodpageFiles/28597.txt", "ISO 8859-7 Greek" ],
[ 28598, "CodpageFiles/28598.txt", "ISO 8859-8 Hebrew" ], [ 28598, "CodpageFiles/28598.txt", "ISO 8859-8 Hebrew" ],
[ 28599, "CodpageFiles/28599.txt", "ISO 8859-9 Latin 5 (Turkish)" ], [ 28599, "CodpageFiles/28599.txt", "ISO 8859-9 Latin 5 (Turkish)" ],
[ 28600, "ISO8859/8859-10.TXT", "ISO 8859-10 Latin 6 (Nordic)" ],
[ 28601, "ISO8859/8859-11.TXT", "ISO 8859-11 Latin (Thai)" ],
[ 28603, "CodpageFiles/28603.txt", "ISO 8859-13 Latin 7 (Baltic)" ], [ 28603, "CodpageFiles/28603.txt", "ISO 8859-13 Latin 7 (Baltic)" ],
[ 28604, "ISO8859/8859-14.TXT", "ISO 8859-14 Latin 8 (Celtic)" ],
[ 28605, "CodpageFiles/28605.txt", "ISO 8859-15 Latin 9 (Euro)" ], [ 28605, "CodpageFiles/28605.txt", "ISO 8859-15 Latin 9 (Euro)" ],
[ 28606, "ISO8859/8859-16.TXT", "ISO 8859-16 Latin 10 (Balkan)" ]
); );
...@@ -407,8 +396,6 @@ my @cp2uni = (); ...@@ -407,8 +396,6 @@ my @cp2uni = ();
my @glyph2uni = (); my @glyph2uni = ();
my @lead_bytes = (); my @lead_bytes = ();
my @uni2cp = (); my @uni2cp = ();
my @unicode_defaults = ();
my @unicode_aliases = ();
my @tolower_table = (); my @tolower_table = ();
my @toupper_table = (); my @toupper_table = ();
my @digitmap_table = (); my @digitmap_table = ();
...@@ -502,38 +489,10 @@ sub build_decompositions(@) ...@@ -502,38 +489,10 @@ sub build_decompositions(@)
################################################################ ################################################################
# read in the Unicode database files # read in the Unicode database files
sub load_data($) sub load_data()
{ {
my $filename = shift;
my $start; my $start;
# first setup a few default mappings
open DEFAULTS, "$filename" or die "Cannot open $filename";
print "Loading $filename\n";
while (<DEFAULTS>)
{
next if /^\#/; # skip comments
next if /^$/; # skip empty lines
if (/^(([0-9a-fA-F]+)(,[0-9a-fA-F]+)*)\s+([0-9a-fA-F]+|'.'|none)\s+(\#.*)?/)
{
my @src = map hex, split /,/,$1;
my $dst = $4;
my $comment = $5;
if ($#src > 0) { push @unicode_aliases, \@src; }
next if ($dst eq "none");
$dst = ($dst =~ /\'.\'/) ? ord substr($dst,1,1) : hex $dst;
foreach my $src (@src)
{
die "Duplicate value" if defined($unicode_defaults[$src]);
$unicode_defaults[$src] = $dst;
}
next;
}
die "Unrecognized line $_\n";
}
close DEFAULTS;
# now build mappings from the decomposition field of the Unicode database # now build mappings from the decomposition field of the Unicode database
my $UNICODE_DATA = open_data_file( $UNIDATA, "UnicodeData.txt" ); my $UNICODE_DATA = open_data_file( $UNIDATA, "UnicodeData.txt" );
...@@ -639,16 +598,6 @@ sub load_data($) ...@@ -639,16 +598,6 @@ sub load_data($)
{ {
next; next;
} }
next if defined($unicode_defaults[$src]); # may have been set in the defaults file
# check for loops
for (my $i = $dst; ; $i = $unicode_defaults[$i])
{
die sprintf("loop detected for %04x -> %04x",$src,$dst) if $i == $src;
last unless defined($unicode_defaults[$i]);
}
$unicode_defaults[$src] = $dst;
} }
close $UNICODE_DATA; close $UNICODE_DATA;
...@@ -698,59 +647,6 @@ sub add_mapping($$) ...@@ -698,59 +647,6 @@ sub add_mapping($$)
} }
################################################################ ################################################################
# parse a standard codepage file
sub output_codepage($$$)
{
my ($codepage, $name, $comment) = @_;
my $INPUT = open_data_file( $MAPPINGS, $name );
while (<$INPUT>)
{
next if /^\#/; # skip comments
next if /^$/; # skip empty lines
next if /\x1a/; # skip ^Z
next if (/^0x([0-9a-fA-F]+)\s+\#UNDEFINED/); # undefined char
if (/^0x([0-9a-fA-F]+)\s+\#DBCS LEAD BYTE/)
{
add_lead_byte( hex $1 );
next;
}
# 0x12 0x3456
if (/^0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)\s+(\#.*)?/)
{
add_mapping( hex $1, hex $2 );
next;
}
# 0x12 0x3456+0x7890
if (/^0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)\+.*\s+(\#.*)?/)
{
add_mapping( hex $1, hex $2 );
next;
}
# 0x12 <LR>+0x3456
if (/^0x([0-9a-fA-F]+)\s+<LR>\+0x([0-9a-fA-F]+)\s+(\#.*)?/)
{
add_mapping( hex $1, hex $2 );
next;
}
# 0x12 <RL>+0x3456
if (/^0x([0-9a-fA-F]+)\s+<RL>\+0x([0-9a-fA-F]+)\s+(\#.*)?/)
{
my $uni = hex $2;
add_mapping( hex $1, $uni ) if $uni >= 0x80;
next;
}
die "$name: Unrecognized line $_\n";
}
close $INPUT;
add_default_mappings();
output_codepage_file( $codepage, "$MAPPINGS/$name", $comment );
}
################################################################
# get a mapping including glyph chars for MB_USEGLYPHCHARS # get a mapping including glyph chars for MB_USEGLYPHCHARS
sub get_glyphs_mapping(@) sub get_glyphs_mapping(@)
{ {
...@@ -944,58 +840,6 @@ sub dump_sortkeys($) ...@@ -944,58 +840,6 @@ sub dump_sortkeys($)
################################################################ ################################################################
# add default mappings once the file had been read
sub add_default_mappings()
{
# Apply aliases
foreach my $alias (@unicode_aliases)
{
my $target = undef;
foreach my $src (@$alias)
{
if (defined($uni2cp[$src]))
{
$target = $uni2cp[$src];
last;
}
}
next unless defined($target);
# At least one char of the alias set is defined, set the others to the same value
foreach my $src (@$alias)
{
$uni2cp[$src] = $target unless defined($uni2cp[$src]);
}
}
# For every src -> target mapping in the defaults table,
# make uni2cp[src] = uni2cp[target] if uni2cp[target] is defined
for (my $src = 0; $src < 65536; $src++)
{
next if defined($uni2cp[$src]); # source has a definition already
next unless defined($unicode_defaults[$src]); # no default for this char
my $target = $unicode_defaults[$src];
# do a recursive mapping until we find a target char that is defined
while (!defined($uni2cp[$target]) &&
defined($unicode_defaults[$target])) { $target = $unicode_defaults[$target]; }
if (defined($uni2cp[$target])) { $uni2cp[$src] = $uni2cp[$target]; }
}
# Add an identity mapping for all undefined chars
for (my $i = 0; $i < 256; $i++)
{
next if defined($cp2uni[$i]);
next if defined($uni2cp[$i]);
$cp2uni[$i] = $uni2cp[$i] = $i;
}
}
################################################################
# dump an array of integers # dump an array of integers
sub dump_array($$@) sub dump_array($$@)
{ {
...@@ -2615,13 +2459,9 @@ sub handle_codepage_file(@) ...@@ -2615,13 +2459,9 @@ sub handle_codepage_file(@)
{ {
output_eucjp_codepage( $filename, $comment ); output_eucjp_codepage( $filename, $comment );
} }
elsif ($filename =~ /^CodpageFiles\//)
{
output_msdata_codepage( $filename, $comment );
}
else else
{ {
output_codepage( $codepage, $filename, $comment ); output_msdata_codepage( $filename, $comment );
} }
} }
...@@ -2697,7 +2537,7 @@ sub REPLACE_IN_FILE($@) ...@@ -2697,7 +2537,7 @@ sub REPLACE_IN_FILE($@)
# main routine # main routine
chdir ".." if -f "./make_unicode"; chdir ".." if -f "./make_unicode";
load_data( $DEFAULTS ); load_data();
dump_case_mappings( "libs/port/casemap.c" ); dump_case_mappings( "libs/port/casemap.c" );
dump_sortkeys( "dlls/kernelbase/collation.c" ); dump_sortkeys( "dlls/kernelbase/collation.c" );
dump_compose_table( "libs/port/compose.c" ); dump_compose_table( "libs/port/compose.c" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment