From a469d37e435cf762dc916b1dedd3856b5180ee41 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 14 Sep 2018 13:06:49 +0300 Subject: [PATCH] xmllite/writer: Simplify setting default output encoding. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/xmllite/writer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index a359e35ee9c..e9ad9413657 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -1846,7 +1846,6 @@ static HRESULT create_writer_output(IUnknown *stream, IMalloc *imalloc, xml_enco HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc *imalloc, const WCHAR *encoding, IXmlWriterOutput **out) { - static const WCHAR utf8W[] = {'U','T','F','-','8',0}; xmlwriteroutput *output; xml_encoding xml_enc; HRESULT hr; @@ -1858,7 +1857,7 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc * *out = NULL; - xml_enc = parse_encoding_name(encoding ? encoding : utf8W, -1); + xml_enc = encoding ? parse_encoding_name(encoding, -1) : XmlEncoding_UTF8; if (SUCCEEDED(hr = create_writer_output(stream, imalloc, xml_enc, encoding, &output))) *out = &output->IXmlWriterOutput_iface;