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
4c10543b
Commit
4c10543b
authored
Jul 20, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jul 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Default to CP_UTF8 when WINEUNIXCP is not set.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
67c8a82f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
unixlib.c
dlls/netapi32/unixlib.c
+11
-7
No files found.
dlls/netapi32/unixlib.c
View file @
4c10543b
...
...
@@ -68,9 +68,9 @@ static NET_API_STATUS (*pNetShareDel)( const char *, const char *, unsigned int
static
NET_API_STATUS
(
*
pNetWkstaGetInfo
)(
const
char
*
,
unsigned
int
,
unsigned
char
**
);
static
CPTABLEINFO
unix_cptable
;
static
ULONG
unix_cp
;
static
ULONG
unix_cp
=
CP_UTF8
;
static
BOOL
get_unix_codepage
(
void
)
static
DWORD
WINAPI
get_unix_codepage_once
(
RTL_RUN_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
static
const
WCHAR
wineunixcpW
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'U'
,
'N'
,
'I'
,
'X'
,
'C'
,
'P'
,
0
};
UNICODE_STRING
name
,
value
;
...
...
@@ -78,19 +78,23 @@ static BOOL get_unix_codepage(void)
SIZE_T
size
;
void
*
ptr
;
if
(
unix_cp
)
return
TRUE
;
RtlInitUnicodeString
(
&
name
,
wineunixcpW
);
value
.
Buffer
=
value_buffer
;
value
.
MaximumLength
=
sizeof
(
value_buffer
);
if
(
!
RtlQueryEnvironmentVariable_U
(
NULL
,
&
name
,
&
value
))
RtlUnicodeStringToInteger
(
&
value
,
10
,
&
unix_cp
);
if
(
NtGetNlsSectionPtr
(
11
,
unix_cp
,
NULL
,
&
ptr
,
&
size
))
return
FALSE
;
RtlInitCodePageTable
(
ptr
,
&
unix_cptable
);
if
(
unix_cp
!=
CP_UTF8
&&
!
NtGetNlsSectionPtr
(
11
,
unix_cp
,
NULL
,
&
ptr
,
&
size
))
RtlInitCodePageTable
(
ptr
,
&
unix_cptable
);
return
TRUE
;
}
static
BOOL
get_unix_codepage
(
void
)
{
static
RTL_RUN_ONCE
once
=
RTL_RUN_ONCE_INIT
;
return
!
RtlRunOnceExecuteOnce
(
&
once
,
get_unix_codepage_once
,
NULL
,
NULL
);
}
static
DWORD
netapi_wcstoumbs
(
const
WCHAR
*
src
,
char
*
dst
,
DWORD
dstlen
)
{
DWORD
srclen
=
(
strlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
);
...
...
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