This fixes eFilmLt.exe when running with builtin msxml6.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55804
-- v3: msxml3: Allow encoding name "ISO8859-1".
From: Bernhard Übelacker bernhardu@mailbox.org
This fixes eFilmLt.exe when running with builtin msxml6.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55804 --- dlls/msxml3/main.c | 1 + dlls/msxml3/tests/domdoc.c | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c index 66e23114bfa..8d5bb5ef2c2 100644 --- a/dlls/msxml3/main.c +++ b/dlls/msxml3/main.c @@ -311,6 +311,7 @@ static void init_char_encoders(void) } encoder[] = { { "gbk", gbk_to_utf8, utf8_to_gbk }, + { "iso8859-1", win1252_to_utf8, utf8_to_win1252 }, { "windows-1250", win1250_to_utf8, utf8_to_win1250 }, { "windows-1251", win1251_to_utf8, utf8_to_win1251 }, { "windows-1252", win1252_to_utf8, utf8_to_win1252 }, diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 7997106bbd0..d153529da5b 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -802,6 +802,13 @@ static const char win1252decl[] = DECL_WIN_1252 ;
+#define DECL_ISO8859_1 \ +"<?xml version=\"1.0\" encoding=\"ISO8859-1\"?>" + +static const char iso8859_1_xml[] = +DECL_ISO8859_1 +"<open></open>"; + static const char nocontent[] = "no xml content here";
static const char szExampleXML[] = @@ -1609,6 +1616,14 @@ if (0) ok( b == VARIANT_FALSE, "succeeded in loading XML string\n"); SysFreeString( str );
+ /* try a BSTR containing a ISO8859-1 document */ + b = VARIANT_TRUE; + str = SysAllocStringByteLen( iso8859_1_xml, strlen(iso8859_1_xml) ); + hr = IXMLDOMDocument_loadXML( doc, str, &b ); + ok(hr == S_FALSE, "loadXML succeeded\n"); + ok( b == VARIANT_FALSE, "succeeded in loading XML string\n"); + SysFreeString( str ); + /* try to load something valid */ b = VARIANT_FALSE; str = SysAllocString( szComplete1 ); @@ -10838,9 +10853,10 @@ static void test_load(void) VARIANT_BOOL expected_ret; } encoding_tests[] = { - { gbkxml, S_OK, VARIANT_TRUE }, - { win1252xml, S_OK, VARIANT_TRUE }, - { win936xml, S_FALSE, VARIANT_FALSE }, + { gbkxml, S_OK, VARIANT_TRUE }, + { win1252xml, S_OK, VARIANT_TRUE }, + { win936xml, S_FALSE, VARIANT_FALSE }, + { iso8859_1_xml, S_OK, VARIANT_TRUE }, };
Thank you both for reviewing. I have removed the library change and put in the suggested change in `init_char_encoders`, and rebased.
Please rebase and repush this.