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
68239a62
Commit
68239a62
authored
Mar 31, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix locale creation for multibyte encoding.
parent
709b4234
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
locale.c
dlls/msvcrt/locale.c
+11
-2
No files found.
dlls/msvcrt/locale.c
View file @
68239a62
...
...
@@ -746,6 +746,7 @@ MSVCRT__locale_t MSVCRT__create_locale(int category, const char *locale)
if
(
lcid
[
MSVCRT_LC_CTYPE
]
&&
(
category
==
MSVCRT_LC_ALL
||
category
==
MSVCRT_LC_CTYPE
))
{
CPINFO
cp
;
int
j
;
if
(
update_threadlocinfo_category
(
lcid
[
MSVCRT_LC_CTYPE
],
loc
,
MSVCRT_LC_CTYPE
))
{
MSVCRT__free_locale
(
loc
);
...
...
@@ -778,8 +779,11 @@ MSVCRT__locale_t MSVCRT__create_locale(int category, const char *locale)
GetStringTypeA
(
lcid
[
MSVCRT_LC_CTYPE
],
CT_CTYPE1
,
buf
,
1
,
loc
->
locinfo
->
ctype1
+
i
);
loc
->
locinfo
->
ctype1
[
i
]
|=
0x200
;
}
for
(
i
=
0
;
cp
.
LeadByte
[
i
+
1
]
!=
0
;
i
+=
2
)
for
(
j
=
cp
.
LeadByte
[
i
];
j
<=
cp
.
LeadByte
[
i
+
1
];
j
++
)
loc
->
locinfo
->
ctype1
[
j
+
1
]
|=
MSVCRT__LEADBYTE
;
}
else
{
loc
->
locinfo
->
lc_clike
=
1
;
loc
->
locinfo
->
mb_cur_max
=
1
;
...
...
@@ -787,9 +791,14 @@ MSVCRT__locale_t MSVCRT__create_locale(int category, const char *locale)
loc
->
locinfo
->
lc_category
[
MSVCRT_LC_CTYPE
].
locale
=
_strdup
(
"C"
);
}
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
{
if
(
loc
->
locinfo
->
pctype
[
i
]
&
MSVCRT__LEADBYTE
)
buf
[
i
]
=
' '
;
else
buf
[
i
]
=
i
;
}
LCMapStringA
(
lcid
[
MSVCRT_LC_CTYPE
],
LCMAP_LOWERCASE
,
buf
,
256
,
(
char
*
)
loc
->
locinfo
->
pclmap
,
256
);
LCMapStringA
(
lcid
[
MSVCRT_LC_CTYPE
],
LCMAP_UPPERCASE
,
buf
,
256
,
...
...
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