forked from Mirrors/wine-wine
xmllite/writer: Simplify setting default output encoding.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>oldstable
parent
2564862b51
commit
a469d37e43
|
@ -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,
|
HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc *imalloc, const WCHAR *encoding,
|
||||||
IXmlWriterOutput **out)
|
IXmlWriterOutput **out)
|
||||||
{
|
{
|
||||||
static const WCHAR utf8W[] = {'U','T','F','-','8',0};
|
|
||||||
xmlwriteroutput *output;
|
xmlwriteroutput *output;
|
||||||
xml_encoding xml_enc;
|
xml_encoding xml_enc;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -1858,7 +1857,7 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc *
|
||||||
|
|
||||||
*out = NULL;
|
*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)))
|
if (SUCCEEDED(hr = create_writer_output(stream, imalloc, xml_enc, encoding, &output)))
|
||||||
*out = &output->IXmlWriterOutput_iface;
|
*out = &output->IXmlWriterOutput_iface;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue