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
31ade1eb
Commit
31ade1eb
authored
Mar 21, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Add support for .inf files in utf-8 format.
parent
f7b565e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
parser.c
dlls/setupapi/parser.c
+14
-3
No files found.
dlls/setupapi/parser.c
View file @
31ade1eb
...
...
@@ -959,10 +959,21 @@ static struct inf_file *parse_file( HANDLE handle, const WCHAR *class, UINT *err
if
(
!
RtlIsTextUnicode
(
buffer
,
size
,
NULL
))
{
WCHAR
*
new_buff
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
)
);
if
(
new_buff
)
static
const
BYTE
utf8_bom
[
3
]
=
{
0xef
,
0xbb
,
0xbf
};
WCHAR
*
new_buff
;
UINT
codepage
=
CP_ACP
;
UINT
offset
=
0
;
if
(
size
>
sizeof
(
utf8_bom
)
&&
!
memcmp
(
buffer
,
utf8_bom
,
sizeof
(
utf8_bom
)
))
{
codepage
=
CP_UTF8
;
offset
=
sizeof
(
utf8_bom
);
}
if
((
new_buff
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
)
)))
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
buffer
,
size
,
new_buff
,
size
);
DWORD
len
=
MultiByteToWideChar
(
codepage
,
0
,
(
char
*
)
buffer
+
offset
,
size
-
offset
,
new_buff
,
size
);
err
=
parse_buffer
(
file
,
new_buff
,
new_buff
+
len
,
error_line
);
HeapFree
(
GetProcessHeap
(),
0
,
new_buff
);
}
...
...
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