Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ef023c3f
Commit
ef023c3f
authored
Mar 30, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Recognize us-ascii encoding.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
64e4a03a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
reader.c
dlls/xmllite/reader.c
+4
-2
writer.c
dlls/xmllite/tests/writer.c
+7
-0
xmllite_private.h
dlls/xmllite/xmllite_private.h
+1
-0
No files found.
dlls/xmllite/reader.c
View file @
ef023c3f
...
...
@@ -84,6 +84,7 @@ typedef enum
StringValue_Last
}
XmlReaderStringValue
;
static
const
WCHAR
usasciiW
[]
=
{
'U'
,
'S'
,
'-'
,
'A'
,
'S'
,
'C'
,
'I'
,
'I'
,
0
};
static
const
WCHAR
utf16W
[]
=
{
'U'
,
'T'
,
'F'
,
'-'
,
'1'
,
'6'
,
0
};
static
const
WCHAR
utf8W
[]
=
{
'U'
,
'T'
,
'F'
,
'-'
,
'8'
,
0
};
...
...
@@ -154,8 +155,9 @@ struct xml_encoding_data
};
static
const
struct
xml_encoding_data
xml_encoding_map
[]
=
{
{
usasciiW
,
XmlEncoding_USASCII
,
20127
},
{
utf16W
,
XmlEncoding_UTF16
,
~
0
},
{
utf8W
,
XmlEncoding_UTF8
,
CP_UTF8
}
{
utf8W
,
XmlEncoding_UTF8
,
CP_UTF8
}
,
};
const
WCHAR
*
get_encoding_name
(
xml_encoding
encoding
)
...
...
@@ -734,7 +736,7 @@ xml_encoding parse_encoding_name(const WCHAR *name, int len)
if
(
!
name
)
return
XmlEncoding_Unknown
;
min
=
0
;
max
=
sizeof
(
xml_encoding_map
)
/
sizeof
(
struct
xml_encoding_data
)
-
1
;
max
=
sizeof
(
xml_encoding_map
)
/
sizeof
(
xml_encoding_map
[
0
]
)
-
1
;
while
(
min
<=
max
)
{
...
...
dlls/xmllite/tests/writer.c
View file @
ef023c3f
...
...
@@ -275,6 +275,7 @@ static void test_writer_create(void)
static
void
test_writeroutput
(
void
)
{
static
const
WCHAR
utf16W
[]
=
{
'u'
,
't'
,
'f'
,
'-'
,
'1'
,
'6'
,
0
};
static
const
WCHAR
usasciiW
[]
=
{
'u'
,
's'
,
'-'
,
'a'
,
's'
,
'c'
,
'i'
,
'i'
,
0
};
IXmlWriterOutput
*
output
;
IUnknown
*
unk
;
HRESULT
hr
;
...
...
@@ -312,6 +313,12 @@ todo_wine
/* releasing 'unk' crashes on native */
IUnknown_Release
(
output
);
IUnknown_Release
(
output
);
/* create with us-ascii */
output
=
NULL
;
hr
=
CreateXmlWriterOutputWithEncodingName
(
&
testoutput
,
NULL
,
usasciiW
,
&
output
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
IUnknown_Release
(
output
);
}
static
void
test_writestartdocument
(
void
)
...
...
dlls/xmllite/xmllite_private.h
View file @
ef023c3f
...
...
@@ -64,6 +64,7 @@ static inline void m_free(IMalloc *imalloc, void *mem)
typedef
enum
{
XmlEncoding_USASCII
,
XmlEncoding_UTF16
,
XmlEncoding_UTF8
,
XmlEncoding_Unknown
...
...
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