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
285922ca
Commit
285922ca
authored
Mar 24, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Skip the UTF-8 byte order mark when returing XML to the client.
parent
4dff2e71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
schedsvc.c
dlls/schedsvc/schedsvc.c
+5
-3
No files found.
dlls/schedsvc/schedsvc.c
View file @
285922ca
...
...
@@ -29,6 +29,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
schedsvc
);
static
const
char
bom_utf8
[]
=
{
0xef
,
0xbb
,
0xbf
};
HRESULT
__cdecl
SchRpcHighestVersion
(
DWORD
*
version
)
{
TRACE
(
"%p
\n
"
,
version
);
...
...
@@ -105,7 +107,6 @@ static HRESULT create_directory(const WCHAR *path)
static
HRESULT
write_xml_utf8
(
const
WCHAR
*
name
,
DWORD
disposition
,
const
WCHAR
*
xmlW
)
{
static
const
char
bom_utf8
[]
=
{
0xef
,
0xbb
,
0xbf
};
static
const
char
comment
[]
=
"<!-- Task definition created by Wine -->
\n
"
;
HANDLE
hfile
;
DWORD
size
;
...
...
@@ -220,8 +221,6 @@ HRESULT __cdecl SchRpcRegisterTask(const WCHAR *path, const WCHAR *xml, DWORD fl
static
int
detect_encoding
(
const
void
*
buffer
,
DWORD
size
)
{
static
const
char
bom_utf8
[]
=
{
0xef
,
0xbb
,
0xbf
};
if
(
size
>=
sizeof
(
bom_utf8
)
&&
!
memcmp
(
buffer
,
bom_utf8
,
sizeof
(
bom_utf8
)))
return
CP_UTF8
;
else
...
...
@@ -270,6 +269,9 @@ static HRESULT read_xml(const WCHAR *name, WCHAR **xml)
return
S_OK
;
}
if
(
cp
==
CP_UTF8
&&
size
>=
sizeof
(
bom_utf8
)
&&
!
memcmp
(
src
,
bom_utf8
,
sizeof
(
bom_utf8
)))
src
+=
sizeof
(
bom_utf8
);
size
=
MultiByteToWideChar
(
cp
,
0
,
src
,
-
1
,
NULL
,
0
);
*
xml
=
heap_alloc
(
size
*
sizeof
(
WCHAR
));
if
(
!*
xml
)
return
E_OUTOFMEMORY
;
...
...
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