make_unicode: Add support for codepage 20949 (Korean Wansung).

Signed-off-by: Sanghoon Park <esifea1908@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sanghoon Park 2021-03-11 14:02:09 +09:00 committed by Alexandre Julliard
parent 580413032c
commit fd3a640206
6 changed files with 45 additions and 0 deletions

View file

@ -76,6 +76,7 @@ HKLM
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
{

View file

@ -159,6 +159,7 @@ static const struct { UINT cp; const WCHAR *name; } codepage_names[] =
{ 20127, L"US-ASCII (7bit)" },
{ 20866, L"Russian KOI8" },
{ 20932, L"EUC-JP" },
{ 20949, L"Korean Wansung" },
{ 21866, L"Ukrainian KOI8" },
{ 28591, L"ISO 8859-1 Latin 1" },
{ 28592, L"ISO 8859-2 Latin 2 (East European)" },

View file

@ -4101,6 +4101,7 @@ c_1361.nls
c_20127.nls
c_20866.nls
c_20932.nls
c_20949.nls
c_21866.nls
c_28591.nls
c_28592.nls

View file

@ -30,6 +30,7 @@ SOURCES = \
c_20127.nls \
c_20866.nls \
c_20932.nls \
c_20949.nls \
c_21866.nls \
c_28591.nls \
c_28592.nls \

BIN
nls/c_20949.nls Normal file

Binary file not shown.

View file

@ -26,6 +26,7 @@ my $UNIVERSION = "13.0.0";
my $UNIDATA = "https://www.unicode.org/Public/$UNIVERSION/ucd/UCD.zip";
my $IDNADATA = "https://www.unicode.org/Public/idna/$UNIVERSION";
my $JISDATA = "https://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS";
my $KSCDATA = "https://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC";
my $REPORTS = "http://www.unicode.org/reports";
my $MSDATA = "https://download.microsoft.com/download/C/F/7/CF713A5E-9FBC-4FD6-9246-275F65C0E498";
my $MSCODEPAGES = "$MSDATA/Windows Supported Code Page Data Files.zip";
@ -942,6 +943,45 @@ sub dump_eucjp_codepage()
output_codepage_file( 20932 );
}
################################################################
# 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()
{
@cp2uni = ();
@glyph2uni = ();
@lead_bytes = ();
@uni2cp = ();
$default_char = 0x3f;
$default_wchar = 0x003f;
# ASCII and undefined chars
foreach my $i (0x00 .. 0x9f) { add_mapping( $i, $i ); }
add_mapping( 0xa0, 0xf8e6 );
add_mapping( 0xad, 0xf8e7 );
add_mapping( 0xae, 0xf8e8 );
add_mapping( 0xaf, 0xf8e9 );
add_mapping( 0xfe, 0xf8ea );
add_mapping( 0xff, 0xf8eb );
my $INPUT = open_data_file( $KSCDATA, "KSX1001.TXT" );
while (<$INPUT>)
{
next if /^\#/; # skip comments
next if /^$/; # skip empty lines
next if /\x1a/; # skip ^Z
if (/^0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)\s+(\#.*)?/)
{
add_mapping( 0x8080 + hex $1, hex $2 );
next;
}
die "Unrecognized line $_\n";
}
close $INPUT;
output_codepage_file( 20949 );
}
################################################################
# build the sort keys table
@ -2773,6 +2813,7 @@ 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;