Sanghoon Park : make_unicode: Add support for codepage 20949 (Korean Wansung).
Alexandre Julliard
julliard at winehq.org
Thu Mar 11 15:59:34 CST 2021
Module: wine
Branch: master
Commit: fd3a6402065a057e189d44905f62774bb6a381c6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fd3a6402065a057e189d44905f62774bb6a381c6
Author: Sanghoon Park <esifea1908 at gmail.com>
Date: Thu Mar 11 14:02:09 2021 +0900
make_unicode: Add support for codepage 20949 (Korean Wansung).
Signed-off-by: Sanghoon Park <esifea1908 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernelbase/kernelbase.rgs | 1 +
dlls/kernelbase/locale.c | 1 +
loader/wine.inf.in | 1 +
nls/Makefile.in | 1 +
nls/c_20949.nls | Bin 0 -> 177698 bytes
tools/make_unicode | 41 +++++++++++++++++++++++++++++++++++++++++
6 files changed, 45 insertions(+)
diff --git a/dlls/kernelbase/kernelbase.rgs b/dlls/kernelbase/kernelbase.rgs
index 629f98ebafa..d35eb0a71a8 100644
--- a/dlls/kernelbase/kernelbase.rgs
+++ b/dlls/kernelbase/kernelbase.rgs
@@ -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
{
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
index 951a8a54a86..9e77ca8dd37 100644
--- a/dlls/kernelbase/locale.c
+++ b/dlls/kernelbase/locale.c
@@ -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)" },
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 627d98a9e66..4cef944fb88 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -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
diff --git a/nls/Makefile.in b/nls/Makefile.in
index a3c3b69b029..4352becac5f 100644
--- a/nls/Makefile.in
+++ b/nls/Makefile.in
@@ -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 \
diff --git a/nls/c_20949.nls b/nls/c_20949.nls
new file mode 100644
index 00000000000..1ee157af003
Binary files /dev/null and b/nls/c_20949.nls differ
diff --git a/tools/make_unicode b/tools/make_unicode
index 93d6a9346c2..053adb92602 100755
--- a/tools/make_unicode
+++ b/tools/make_unicode
@@ -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;
More information about the wine-cvs
mailing list