Commit c4852be2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Don't force parser encoding when loading from file.

parent a758a67a
......@@ -141,14 +141,14 @@ static xmldoc_priv * create_priv(void)
return priv;
}
static xmlDocPtr doparse( char *ptr, int len )
static xmlDocPtr doparse( char *ptr, int len, const char *encoding )
{
#ifdef HAVE_XMLREADMEMORY
/*
* use xmlReadMemory if possible so we can suppress
* writing errors to stderr
*/
return xmlReadMemory( ptr, len, NULL, "UTF-8",
return xmlReadMemory( ptr, len, NULL, encoding,
XML_PARSE_NOERROR | XML_PARSE_NOWARNING | XML_PARSE_NOBLANKS );
#else
return xmlParseMemory( ptr, len );
......@@ -1447,7 +1447,7 @@ static HRESULT domdoc_onDataAvailable(void *obj, char *ptr, DWORD len)
domdoc *This = obj;
xmlDocPtr xmldoc;
xmldoc = doparse( ptr, len );
xmldoc = doparse( ptr, len, NULL );
if(xmldoc) {
xmldoc->_private = create_priv();
return attach_xmldoc(&This->node, xmldoc);
......@@ -1683,9 +1683,9 @@ static HRESULT WINAPI domdoc_loadXML(
{
*isSuccessful = VARIANT_FALSE;
if ( bstrXML && bstr_to_utf8( bstrXML, &str, &len ) )
if ( bstrXML && bstr_to_utf8( bstrXML, &str, &len ) )
{
xmldoc = doparse( str, len );
xmldoc = doparse( str, len, "UTF-8" );
heap_free( str );
if ( !xmldoc )
This->error = E_FAIL;
......
......@@ -437,6 +437,7 @@ static HRESULT WINAPI xmlnode_get_firstChild(
IXMLDOMNode** firstChild)
{
xmlnode *This = impl_from_IXMLDOMNode( iface );
TRACE("(%p)->(%p)\n", This, firstChild);
return get_node( This, "firstChild", This->node->children, firstChild );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment