Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
3d36713c
Commit
3d36713c
authored
20 years ago
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Initialize also ACP, OEMCP and MACCP in registry on locale change.
parent
58dde17c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/kernel/locale.c
+35
-7
35 additions, 7 deletions
dlls/kernel/locale.c
with
35 additions
and
7 deletions
dlls/kernel/locale.c
+
35
−
7
View file @
3d36713c
...
...
@@ -55,6 +55,15 @@ static const union cptable *oem_cptable;
static
const
union
cptable
*
mac_cptable
;
static
const
union
cptable
*
unix_cptable
;
/* NULL if UTF8 */
static
HKEY
NLS_RegOpenKey
(
HKEY
hRootKey
,
LPCWSTR
szKeyName
);
static
HKEY
NLS_RegOpenSubKey
(
HKEY
hRootKey
,
LPCWSTR
szKeyName
);
static
const
WCHAR
szNlsKeyName
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'N'
,
'l'
,
's'
,
'\0'
};
/* Charset to codepage map, sorted by name. */
static
const
struct
charset_entry
{
...
...
@@ -244,6 +253,19 @@ inline static HKEY create_registry_key(void)
*/
void
LOCALE_InitRegistry
(
void
)
{
static
const
WCHAR
CodepageW
[]
=
{
'C'
,
'o'
,
'd'
,
'e'
,
'p'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
acpW
[]
=
{
'A'
,
'C'
,
'P'
,
0
};
static
const
WCHAR
oemcpW
[]
=
{
'O'
,
'E'
,
'M'
,
'C'
,
'P'
,
0
};
static
const
WCHAR
maccpW
[]
=
{
'M'
,
'A'
,
'C'
,
'C'
,
'P'
,
0
};
static
const
struct
{
LPCWSTR
name
;
USHORT
value
;
}
update_cp_values
[]
=
{
{
acpW
,
LOCALE_IDEFAULTANSICODEPAGE
},
{
oemcpW
,
LOCALE_IDEFAULTCODEPAGE
},
{
maccpW
,
LOCALE_IDEFAULTMACCODEPAGE
}
};
static
const
USHORT
updateValues
[]
=
{
LOCALE_SLANGUAGE
,
LOCALE_SCOUNTRY
,
LOCALE_ICOUNTRY
,
...
...
@@ -306,6 +328,18 @@ void LOCALE_InitRegistry(void)
sizeof
(
bufferW
)
/
sizeof
(
WCHAR
)
);
SetLocaleInfoW
(
lcid
,
updateValues
[
i
],
bufferW
);
}
hkey
=
NLS_RegOpenSubKey
(
NLS_RegOpenKey
(
0
,
szNlsKeyName
),
CodepageW
);
for
(
i
=
0
;
i
<
sizeof
(
update_cp_values
)
/
sizeof
(
update_cp_values
[
0
]);
i
++
)
{
count
=
GetLocaleInfoW
(
lcid
,
update_cp_values
[
i
].
value
|
LOCALE_NOUSEROVERRIDE
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
WCHAR
)
);
RtlInitUnicodeString
(
&
nameW
,
update_cp_values
[
i
].
name
);
NtSetValueKey
(
hkey
,
&
nameW
,
0
,
REG_SZ
,
bufferW
,
count
*
sizeof
(
WCHAR
)
);
}
NtClose
(
hkey
);
}
...
...
@@ -2620,12 +2654,6 @@ static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSiz
}
/* Registry keys for NLS related information */
static
const
WCHAR
szNlsKeyName
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'N'
,
'l'
,
's'
,
'\0'
};
static
const
WCHAR
szLangGroupsKeyName
[]
=
{
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
' '
,
'G'
,
'r'
,
'o'
,
'u'
,
'p'
,
's'
,
'\0'
};
...
...
@@ -2679,7 +2707,7 @@ static BOOL NLS_EnumSystemLanguageGroups(ENUMLANGUAGEGROUP_CALLBACKS *lpProcs)
hKey
=
NLS_RegOpenSubKey
(
NLS_RegOpenKey
(
0
,
szNlsKeyName
),
szLangGroupsKeyName
);
if
(
!
hKey
)
WARN
(
"NLS registry key not found. Please apply the default registry file 'wine
default.reg
'
\n
"
);
FIXME
(
"NLS registry key not found. Please apply the default registry file 'wine
.inf
'
\n
"
);
while
(
bContinue
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment