kernel32: use ANSI code page if current thread locale has no code page (try 2)
Alexandre Julliard
julliard at winehq.org
Mon Nov 4 12:29:29 CST 2013
Daniel Lehman <dlehman at esri.com> writes:
> @@ -394,10 +398,48 @@ static void test_undefined_byte_char(void)
> }
> }
>
> +static void test_unicode_only(void)
> +{
> + LCID last;
> + BOOL ret;
> +
> + if (!pSetThreadLocale || !pGetThreadLocale)
> + {
> + win_skip("SetThreadLocale and/or GetThreadLocale not found\n");
> + return;
> + }
> +
> + if (!IsValidCodePage(1081)) /* Hindi_India */
> + {
> + skip("Codepage 1081 not available\n");
> + return;
> + }
> +
> + last = pGetThreadLocale();
> +
> + pSetThreadLocale(1252);
> + SetLastError(0xdeadbeef);
> + ret = WideCharToMultiByte(1081, 0, foobarW, -1, NULL, 0, NULL, NULL);
> + ok(ret == 7, "ret is %d\n", ret);
> + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError());
This doesn't make any sense. 1081 is not a codepage, and 1252 is not a
locale.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list