From: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> --- dlls/msxml3/node.c | 4 ++++ dlls/msxml3/tests/domdoc.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 70e0b02c077..7492a76865f 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -4678,6 +4678,10 @@ HRESULT node_save(struct domnode *doc, IStream *stream) node_dump_context_init(&context, codepage, stream); + /* UTF-16 BE BOM */ + if (codepage == ~0u) + node_dump_append(&context, L"\xfeff", 1); + LIST_FOR_EACH_ENTRY(node, &doc->children, struct domnode, entry) { node_dump(node, &context); diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index b76684b1ebc..7a3cfc45f12 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -6687,7 +6687,6 @@ static void test_save(void) hr = GetHGlobalFromStream(stream, &global); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ptr = GlobalLock(global); - todo_wine ok(!memcmp(ptr, "\xff\xfe<\x00", 4), "Unexpected content %s.\n", debugstr_an(ptr, 4)); GlobalUnlock(global); IStream_Release(stream); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11583