make_unicode: Use codepage 949 to add default mappings to codepage 20949.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6f68543692)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-03-11 12:46:04 +01:00 committed by Michael Stefaniuc
parent dbd00086d5
commit 6cc71f92a3
3 changed files with 66 additions and 48 deletions

View File

@ -10,6 +10,49 @@ HKLM
{
Codepage
{
val '10000' = s 'c_10000.nls'
val '10001' = s 'c_10001.nls'
val '10002' = s 'c_10002.nls'
val '10003' = s 'c_10003.nls'
val '10004' = s 'c_10004.nls'
val '10005' = s 'c_10005.nls'
val '10006' = s 'c_10006.nls'
val '10007' = s 'c_10007.nls'
val '10008' = s 'c_10008.nls'
val '10010' = s 'c_10010.nls'
val '10017' = s 'c_10017.nls'
val '10021' = s 'c_10021.nls'
val '10029' = s 'c_10029.nls'
val '10079' = s 'c_10079.nls'
val '10081' = s 'c_10081.nls'
val '10082' = s 'c_10082.nls'
val '1026' = s 'c_1026.nls'
val '1250' = s 'c_1250.nls'
val '1251' = s 'c_1251.nls'
val '1252' = s 'c_1252.nls'
val '1253' = s 'c_1253.nls'
val '1254' = s 'c_1254.nls'
val '1255' = s 'c_1255.nls'
val '1256' = s 'c_1256.nls'
val '1257' = s 'c_1257.nls'
val '1258' = s 'c_1258.nls'
val '1361' = s 'c_1361.nls'
val '20127' = s 'c_20127.nls'
val '20866' = s 'c_20866.nls'
val '20932' = s 'c_20932.nls'
val '20949' = s 'c_20949.nls'
val '21866' = s 'c_21866.nls'
val '28591' = s 'c_28591.nls'
val '28592' = s 'c_28592.nls'
val '28593' = s 'c_28593.nls'
val '28594' = s 'c_28594.nls'
val '28595' = s 'c_28595.nls'
val '28596' = s 'c_28596.nls'
val '28597' = s 'c_28597.nls'
val '28598' = s 'c_28598.nls'
val '28599' = s 'c_28599.nls'
val '28603' = s 'c_28603.nls'
val '28605' = s 'c_28605.nls'
val '37' = s 'c_037.nls'
val '437' = s 'c_437.nls'
val '500' = s 'c_500.nls'
@ -34,49 +77,6 @@ HKLM
val '936' = s 'c_936.nls'
val '949' = s 'c_949.nls'
val '950' = s 'c_950.nls'
val '1026' = s 'c_1026.nls'
val '1250' = s 'c_1250.nls'
val '1251' = s 'c_1251.nls'
val '1252' = s 'c_1252.nls'
val '1253' = s 'c_1253.nls'
val '1254' = s 'c_1254.nls'
val '1255' = s 'c_1255.nls'
val '1256' = s 'c_1256.nls'
val '1257' = s 'c_1257.nls'
val '1258' = s 'c_1258.nls'
val '1361' = s 'c_1361.nls'
val '10000' = s 'c_10000.nls'
val '10001' = s 'c_10001.nls'
val '10002' = s 'c_10002.nls'
val '10003' = s 'c_10003.nls'
val '10004' = s 'c_10004.nls'
val '10005' = s 'c_10005.nls'
val '10006' = s 'c_10006.nls'
val '10007' = s 'c_10007.nls'
val '10008' = s 'c_10008.nls'
val '10010' = s 'c_10010.nls'
val '10017' = s 'c_10017.nls'
val '10021' = s 'c_10021.nls'
val '10029' = s 'c_10029.nls'
val '10079' = s 'c_10079.nls'
val '10081' = s 'c_10081.nls'
val '10082' = s 'c_10082.nls'
val '20127' = s 'c_20127.nls'
val '20866' = s 'c_20866.nls'
val '21866' = s 'c_21866.nls'
val '28591' = s 'c_28591.nls'
val '28592' = s 'c_28592.nls'
val '28593' = s 'c_28593.nls'
val '28594' = s 'c_28594.nls'
val '28595' = s 'c_28595.nls'
val '28596' = s 'c_28596.nls'
val '28597' = s 'c_28597.nls'
val '28598' = s 'c_28598.nls'
val '28599' = s 'c_28599.nls'
val '28603' = s 'c_28603.nls'
val '28605' = s 'c_28605.nls'
val '20932' = s 'c_20932.nls'
val '20949' = s 'c_20949.nls'
}
Normalization
{

Binary file not shown.

View File

@ -936,10 +936,9 @@ sub dump_eucjp_codepage()
################################################################
# build Korean Wansung table from the KSX1001 file
# FIXME: compare to Windows we should add extra mappings for
# characters added from Unicode 1.1 to enhance the completeness.
sub dump_krwansung_codepage()
sub dump_krwansung_codepage(@)
{
my @cp949 = @_;
@cp2uni = ();
@glyph2uni = ();
@lead_bytes = ();
@ -971,6 +970,24 @@ sub dump_krwansung_codepage()
}
close $INPUT;
# get some extra mappings from cp 949
my @defined_lb;
map { $defined_lb[$_] = 1; } @lead_bytes;
foreach my $i (0x0000 .. 0xffff)
{
next if ($i >= 0x1100 && $i <= 0x11ff); # range not used in 20949
next unless defined $cp949[$i];
if ($cp949[$i] >= 0xff)
{
# only add chars for lead bytes that exist in 20949
my $hi = $cp949[$i] >> 8;
my $lo = $cp949[$i] & 0xff;
next unless $defined_lb[$hi];
next unless $lo >= 0xa1 && $lo <= 0xfe;
}
add_mapping( $cp949[$i], $i );
}
output_codepage_file( 20949 );
}
@ -2292,6 +2309,8 @@ sub dump_msdata_codepage($)
close $INPUT;
output_codepage_file( $codepage );
if ($codepage == 949) { dump_krwansung_codepage( @uni2cp ); }
}
################################################################
@ -2709,7 +2728,7 @@ sub dump_registry_script($%)
$i == $#subkeys && $def ? " = s '$def'" : "", 4 * $indent, "";
$indent++;
}
foreach my $v (@vals) { printf OUTPUT "%*sval $v\n", 4 * $indent, ""; }
foreach my $v (sort @vals) { printf OUTPUT "%*sval $v\n", 4 * $indent, ""; }
for (my $i = 0; $i < @subkeys; $i++) { printf OUTPUT "%*s}\n", 4 * --$indent, ""; }
}
while ($indent) { printf OUTPUT "%*s}\n", 4 * --$indent, ""; }
@ -2763,7 +2782,6 @@ dump_norm_table( "nls/normidna.nls" );
dump_sortkey_table( "nls/sortdefault.nls", "Windows 10 Sorting Weight Table.txt" );
foreach my $file (@allfiles) { dump_msdata_codepage( $file ); }
dump_eucjp_codepage();
dump_krwansung_codepage();
dump_registry_script( "dlls/kernelbase/kernelbase.rgs", %registry_keys );
exit 0;