From: Jactry Zeng jzeng@codeweavers.com
--- 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 66e23114bfa..3871e4821b4 100644 --- a/dlls/msxml3/main.c +++ b/dlls/msxml3/main.c @@ -310,6 +310,7 @@ static void init_char_encoders(void) xmlCharEncodingOutputFunc output; } encoder[] = { + { "gb2312", gbk_to_utf8, utf8_to_gbk }, { "gbk", gbk_to_utf8, utf8_to_gbk }, { "windows-1250", win1250_to_utf8, utf8_to_win1250 }, { "windows-1251", win1251_to_utf8, utf8_to_win1251 }, diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 6590a8dbad4..e6b45798af8 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -791,6 +791,13 @@ static const char win936xml[] = DECL_WIN_936 "<open></open>";
+#define DECL_WIN_GB2312 \ +"<?xml version=\"1.0\" encoding=\"GB2312\"?>" + +static const char gb2312xml[] = +DECL_WIN_GB2312 +"<open></open>"; + #define DECL_WIN_1252 \ "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>"
@@ -10836,6 +10843,7 @@ static void test_load(void) { gbkxml, S_OK, VARIANT_TRUE }, { win1252xml, S_OK, VARIANT_TRUE }, { win936xml, S_FALSE, VARIANT_FALSE }, + { gb2312xml, S_OK, VARIANT_TRUE }, };
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=137745
Your paranoid android.
=== debian11b (64 bit WoW report) ===
dmime: dmime.c:2298: Test failed: got 265
Is there a way to test if GB2312 is treated the same as GBK in msxml? It looks like GBK is a replacement ofr GB2312, so maybe we could have some edge cases to see if it's converted the same way.
GBK is an extension of GB2312. But there might be differences in implementation, which I am not sure - https://en.wikipedia.org/wiki/GB_2312#Two_implementations_of_GB2312. GBK is implemented in windows as CP936.
As per MS https://learn.microsoft.com/en-us/previous-versions/troubleshoot/msxml/xml-e... both should work the same as gbk is an alias for gb2312 (in MIME Database registry details)
On Thu Dec 7 14:24:29 2023 +0000, Vijay Kiran Kamuju wrote:
As per MS https://learn.microsoft.com/en-us/previous-versions/troubleshoot/msxml/xml-e... both should work the same as gbk is an alias for gb2312 (in MIME Database registry details)
Hi Vijay,
Sorry for the delay.
Yes, I have done some tests on it previously, and there isn't any difference between GB2312 and GBK in Windows' msxml. However, during these tests, I also found that Wine's implementation doesn't encode/decode GBK correctly. So I will need to fix that issue first, and then I can integrate tests of GB2312 and GBK into Wine. I was caught up in some other things after that, so still didn't dig deeper into it so far.