msvcrt: Reject UTF-8 locales in setlocale function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fac521ee33
commit
b35faeb503
|
@ -134,7 +134,7 @@ static void test_setlocale(void)
|
|||
ok(ret != NULL, "expected success, but got NULL\n");
|
||||
if(!strcmp(names[i], "syr-SY") && GetACP() == CP_UTF8)
|
||||
{
|
||||
todo_wine ok(!strcmp(ret, "LC_COLLATE=syr-SY;LC_CTYPE=EN-US;LC_MONETARY=syr-SY;"
|
||||
ok(!strcmp(ret, "LC_COLLATE=syr-SY;LC_CTYPE=EN-US;LC_MONETARY=syr-SY;"
|
||||
"LC_NUMERIC=syr-SY;LC_TIME=syr-SY"), "got %s\n", ret);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1334,6 +1334,14 @@ static pthreadlocinfo create_locinfo(int category,
|
|||
}
|
||||
|
||||
for(i=1; i<6; i++) {
|
||||
#if _MSVCR_VER < 140
|
||||
if(i==LC_CTYPE && cp[i]==CP_UTF8) {
|
||||
locale_name[i] = NULL;
|
||||
locale_len[i] = 0;
|
||||
lcid[i] = old_locinfo ? old_locinfo->lc_handle[i] : 0;
|
||||
cp[i] = old_locinfo ? old_locinfo->lc_id[i].wCodePage : 0;
|
||||
}
|
||||
#endif
|
||||
if(category!=LC_ALL && category!=i) {
|
||||
if(old_locinfo) {
|
||||
lcid[i] = old_locinfo->lc_handle[i];
|
||||
|
|
Loading…
Reference in New Issue