Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9f1fb465
Commit
9f1fb465
authored
Jun 14, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jun 14, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Ignore the encoding attribute when loading a new XML document in IXMLDOMDocument::loadXML.
parent
341f878c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
domdoc.c
dlls/msxml3/domdoc.c
+1
-1
domdoc.c
dlls/msxml3/tests/domdoc.c
+26
-0
No files found.
dlls/msxml3/domdoc.c
View file @
9f1fb465
...
...
@@ -148,7 +148,7 @@ static xmlDocPtr doparse( char *ptr, int len )
* use xmlReadMemory if possible so we can suppress
* writing errors to stderr
*/
return
xmlReadMemory
(
ptr
,
len
,
NULL
,
NULL
,
return
xmlReadMemory
(
ptr
,
len
,
NULL
,
"UTF-8"
,
XML_PARSE_NOERROR
|
XML_PARSE_NOWARNING
|
XML_PARSE_NOBLANKS
);
#else
return
xmlParseMemory
(
ptr
,
len
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
9f1fb465
...
...
@@ -90,6 +90,16 @@ static const WCHAR szComplete5[] = {
'<'
,
'/'
,
'S'
,
':'
,
's'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
'>'
,
0
};
static
const
WCHAR
szComplete6
[]
=
{
'<'
,
'?'
,
'x'
,
'm'
,
'l'
,
' '
,
'v'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'='
,
'\''
,
'1'
,
'.'
,
'0'
,
'\''
,
' '
,
'e'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
'='
,
'\''
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'-'
,
'1'
,
'2'
,
'5'
,
'2'
,
'\''
,
'?'
,
'>'
,
'\n'
,
'<'
,
'o'
,
'p'
,
'e'
,
'n'
,
'>'
,
'<'
,
'/'
,
'o'
,
'p'
,
'e'
,
'n'
,
'>'
,
'\n'
,
0
};
static
const
CHAR
szNonUnicodeXML
[]
=
"<?xml version='1.0' encoding='Windows-1252'?>
\n
"
"<open></open>
\n
"
;
static
const
CHAR
szExampleXML
[]
=
"<?xml version='1.0' encoding='utf-8'?>
\n
"
"<root xmlns:foo='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'>
\n
"
...
...
@@ -618,6 +628,22 @@ if (0)
ok
(
r
==
S_OK
,
"loadXML failed
\n
"
);
ok
(
b
==
VARIANT_TRUE
,
"failed to load XML string
\n
"
);
/* loadXML ignores the encoding attribute and always expects Unicode */
b
=
VARIANT_FALSE
;
str
=
SysAllocString
(
szComplete6
);
r
=
IXMLDOMDocument_loadXML
(
doc
,
str
,
&
b
);
ok
(
r
==
S_OK
,
"loadXML failed
\n
"
);
ok
(
b
==
VARIANT_TRUE
,
"failed to load XML string
\n
"
);
SysFreeString
(
str
);
/* try a BSTR containing a Windows-1252 document */
b
=
VARIANT_TRUE
;
str
=
SysAllocStringByteLen
(
szNonUnicodeXML
,
sizeof
(
szNonUnicodeXML
)
-
1
);
r
=
IXMLDOMDocument_loadXML
(
doc
,
str
,
&
b
);
ok
(
r
==
S_FALSE
,
"loadXML succeeded
\n
"
);
ok
(
b
==
VARIANT_FALSE
,
"succeeded in loading XML string
\n
"
);
SysFreeString
(
str
);
/* try to load something valid */
b
=
VARIANT_FALSE
;
str
=
SysAllocString
(
szComplete1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment