From 3d1b6a4bc09a5eda41917fde84108ef697c6b772 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 11 Sep 2025 09:48:29 +1000 Subject: [PATCH] Added msxml3_encode_gb2312 patchset --- ...2-support-for-builtin-character-conv.patch | 51 +++++++++++++++++++ patches/msxml3_encode_gb2312/definition | 6 +++ 2 files changed, 57 insertions(+) create mode 100644 patches/msxml3_encode_gb2312/0001-msxml3-Add-GB2312-support-for-builtin-character-conv.patch create mode 100644 patches/msxml3_encode_gb2312/definition diff --git a/patches/msxml3_encode_gb2312/0001-msxml3-Add-GB2312-support-for-builtin-character-conv.patch b/patches/msxml3_encode_gb2312/0001-msxml3-Add-GB2312-support-for-builtin-character-conv.patch new file mode 100644 index 00000000..d9f778e9 --- /dev/null +++ b/patches/msxml3_encode_gb2312/0001-msxml3-Add-GB2312-support-for-builtin-character-conv.patch @@ -0,0 +1,51 @@ +From 2e2e981c7b2c2e109730a646cda6f12ca7428927 Mon Sep 17 00:00:00 2001 +From: Jactry Zeng +Date: Fri, 22 Sep 2023 09:13:29 -0500 +Subject: [PATCH] msxml3: Add GB2312 support for builtin character converter. + +--- + dlls/msxml3/main.c | 1 + + dlls/msxml3/tests/domdoc.c | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c +index 16e0b38b185..b0711c510f6 100644 +--- a/dlls/msxml3/main.c ++++ b/dlls/msxml3/main.c +@@ -321,6 +321,7 @@ static void init_char_encoders(void) + xmlCharEncodingOutputFunc output; + } encoder[] = + { ++ { "gb2312", gbk_to_utf8, utf8_to_gbk }, + { "gbk", gbk_to_utf8, utf8_to_gbk }, + { "iso8859-1", iso8859_1_to_utf8, utf8_to_iso8859_1 }, + { "windows-1250", win1250_to_utf8, utf8_to_win1250 }, +diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c +index 84a1f330582..44ea0ac3b3a 100644 +--- a/dlls/msxml3/tests/domdoc.c ++++ b/dlls/msxml3/tests/domdoc.c +@@ -798,6 +798,13 @@ static const char win936xml[] = + DECL_WIN_936 + ""; + ++#define DECL_WIN_GB2312 \ ++"" ++ ++static const char gb2312xml[] = ++DECL_WIN_GB2312 ++""; ++ + #define DECL_WIN_1252 \ + "" + +@@ -10981,6 +10988,7 @@ static void test_load(void) + { iso8859_1_xml, S_OK, VARIANT_TRUE }, + { win1252xml, S_OK, VARIANT_TRUE }, + { win936xml, S_FALSE, VARIANT_FALSE }, ++ { gb2312xml, S_OK, VARIANT_TRUE }, + }; + + +-- +2.51.0 + diff --git a/patches/msxml3_encode_gb2312/definition b/patches/msxml3_encode_gb2312/definition new file mode 100644 index 00000000..c0e0b407 --- /dev/null +++ b/patches/msxml3_encode_gb2312/definition @@ -0,0 +1,6 @@ +Fixes: [58673] msxml: Add GB2312 support for builtin character converter. + + +# PR https://gitlab.winehq.org/wine/wine/-/merge_requests/3928 + +