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
8c24ef78
Commit
8c24ef78
authored
Jul 16, 2004
by
Shachar Shemesh
Committed by
Alexandre Julliard
Jul 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
System default locale in Windows determines the ANSI encoding
(LC_CTYPE on Unix).
parent
0a8c92b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
locale.c
dlls/kernel/locale.c
+6
-4
No files found.
dlls/kernel/locale.c
View file @
8c24ef78
...
...
@@ -505,13 +505,13 @@ static int charset_cmp( const void *name, const void *entry )
/***********************************************************************
* init_default_lcid
*/
static
LCID
init_default_lcid
(
UINT
*
unix_cp
)
static
LCID
init_default_lcid
(
UINT
*
unix_cp
,
const
char
*
env_str
)
{
char
*
buf
,
*
lang
,
*
country
,
*
charset
,
*
dialect
,
*
next
;
LCID
ret
=
0
;
if
((
lang
=
getenv
(
"LC_ALL"
))
||
(
lang
=
getenv
(
"LANGUAGE"
))
||
(
env_str
&&
(
lang
=
getenv
(
env_str
)
))
||
(
lang
=
getenv
(
"LANG"
)))
{
if
(
!
strcmp
(
lang
,
"POSIX"
)
||
!
strcmp
(
lang
,
"C"
))
goto
done
;
...
...
@@ -2483,11 +2483,13 @@ void LOCALE_Init(void)
const
union
cptable
*
unix_cp
);
UINT
ansi_cp
=
1252
,
oem_cp
=
437
,
mac_cp
=
10000
,
unix_cp
=
~
0U
;
LCID
lcid
=
init_default_lcid
(
&
unix_cp
);
LCID
lcid
=
init_default_lcid
(
&
unix_cp
,
NULL
);
NtSetDefaultLocale
(
FALSE
,
lcid
);
NtSetDefaultLocale
(
TRUE
,
lcid
);
lcid
=
init_default_lcid
(
&
unix_cp
,
"LC_CTYPE"
);
NtSetDefaultLocale
(
FALSE
,
lcid
);
ansi_cp
=
get_lcid_codepage
(
lcid
);
GetLocaleInfoW
(
lcid
,
LOCALE_IDEFAULTMACCODEPAGE
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
mac_cp
,
sizeof
(
mac_cp
)
/
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