mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
msxml3: Don't force parser encoding when loading from file.
This commit is contained in:
parent
a758a67a8c
commit
c4852be28e
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user