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
1967d7cd
Commit
1967d7cd
authored
Nov 28, 2023
by
Jactry Zeng
Committed by
Alexandre Julliard
Nov 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Try harder to fallback to neutral locales.
parent
730bdf6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
env.c
dlls/ntdll/unix/env.c
+15
-3
No files found.
dlls/ntdll/unix/env.c
View file @
1967d7cd
...
...
@@ -799,6 +799,7 @@ static void init_locale(void)
struct
locale_nls_header
*
header
;
const
NLS_LOCALE_HEADER
*
locale_table
;
const
NLS_LOCALE_DATA
*
locale
;
char
*
p
;
setlocale
(
LC_ALL
,
""
);
if
(
!
unix_to_win_locale
(
setlocale
(
LC_CTYPE
,
NULL
),
system_locale
))
system_locale
[
0
]
=
0
;
...
...
@@ -863,10 +864,21 @@ static void init_locale(void)
if
((
header
=
read_nls_file
(
"locale.nls"
)))
{
locale_table
=
(
const
NLS_LOCALE_HEADER
*
)((
char
*
)
header
+
header
->
locales
);
if
((
locale
=
get_win_locale
(
locale_table
,
system_locale
))
&&
locale
->
idefaultlanguage
!=
LOCALE_CUSTOM_UNSPECIFIED
)
while
(
!
(
locale
=
get_win_locale
(
locale_table
,
system_locale
)))
{
if
(
!
(
p
=
strrchr
(
system_locale
,
'-'
)))
break
;
*
p
=
0
;
}
if
(
locale
&&
locale
->
idefaultlanguage
!=
LOCALE_CUSTOM_UNSPECIFIED
)
system_lcid
=
locale
->
idefaultlanguage
;
if
((
locale
=
get_win_locale
(
locale_table
,
user_locale
)))
user_lcid
=
locale
->
idefaultlanguage
;
while
(
!
(
locale
=
get_win_locale
(
locale_table
,
user_locale
)))
{
if
(
!
(
p
=
strrchr
(
user_locale
,
'-'
)))
break
;
*
p
=
0
;
}
if
(
locale
)
user_lcid
=
locale
->
idefaultlanguage
;
free
(
header
);
}
if
(
!
system_lcid
)
system_lcid
=
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_DEFAULT
);
...
...
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