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
967ef0bf
Commit
967ef0bf
authored
Apr 13, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Support overriding the codepage from the manifest.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52223
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1326687f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
loader.c
dlls/ntdll/loader.c
+1
-1
locale.c
dlls/ntdll/locale.c
+21
-0
No files found.
dlls/ntdll/loader.c
View file @
967ef0bf
...
...
@@ -4126,8 +4126,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
RtlInitAnsiString
(
&
func_name
,
"CtrlRoutine"
);
LdrGetProcedureAddress
(
kernel32
->
ldr
.
DllBase
,
&
func_name
,
0
,
(
void
**
)
&
pCtrlRoutine
);
locale_init
();
actctx_init
();
locale_init
();
if
(
wm
->
ldr
.
Flags
&
LDR_COR_ILONLY
)
status
=
fixup_imports_ilonly
(
wm
,
NULL
,
entry
);
else
...
...
dlls/ntdll/locale.c
View file @
967ef0bf
...
...
@@ -209,6 +209,27 @@ void locale_init(void)
oem_cp
=
get_locale_data
(
entry
->
idx
)
->
idefaultcodepage
;
}
if
(
!
RtlQueryActivationContextApplicationSettings
(
0
,
NULL
,
L"http://schemas.microsoft.com/SMI/2019/WindowsSettings"
,
L"activeCodePage"
,
locale
,
ARRAY_SIZE
(
locale
),
NULL
))
{
const
NLS_LOCALE_LCNAME_INDEX
*
entry
=
find_lcname_entry
(
locale
);
if
(
!
wcsicmp
(
locale
,
L"utf-8"
))
{
ansi_cp
=
oem_cp
=
CP_UTF8
;
}
else
if
(
!
wcsicmp
(
locale
,
L"legacy"
))
{
if
(
ansi_cp
==
CP_UTF8
)
ansi_cp
=
1252
;
if
(
oem_cp
==
CP_UTF8
)
oem_cp
=
437
;
}
else
if
((
entry
=
find_lcname_entry
(
locale
)))
{
ansi_cp
=
get_locale_data
(
entry
->
idx
)
->
idefaultansicodepage
;
oem_cp
=
get_locale_data
(
entry
->
idx
)
->
idefaultcodepage
;
}
}
NtGetNlsSectionPtr
(
10
,
0
,
NULL
,
&
case_ptr
,
&
size
);
NtCurrentTeb
()
->
Peb
->
UnicodeCaseTableData
=
case_ptr
;
if
(
ansi_cp
!=
CP_UTF8
)
...
...
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