kernel32: use ANSI code page if current thread locale has no code page (try 4)

Alexandre Julliard julliard at winehq.org
Thu Nov 7 06:43:06 CST 2013


Daniel Lehman <dlehman at esri.com> writes:

> +    for (i = 0; i < sizeof(lcids)/sizeof(lcids[0]); i++)
> +    {
> +        SetThreadLocale(lcids[i].lcid);
> +
> +        GetLocaleInfoA(lcids[i].lcid, LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, (LPSTR)&cp, sizeof(cp));
> +        ok(cp == lcids[i].defacp, "wrong codepage %i for lcid %04x, should be %04x\n", cp, lcids[i].defacp, cp);
> +
> +        /* GetCPInfoEx/GetCPInfo - CP_ACP */
> +        memset(&cpi, 0, sizeof(cpi));
> +        GetCPInfoExA(CP_ACP, 0, &cpi);
> +        ok(cpi.CodePage == 1252 /* ANSI Latin 1 */, "wrong codepage %i for lcid %04x, should be 1252\n",
> +           cpi.CodePage, lcids[i].lcid);

This should be checked against the current locale, there's no reason
that it would always be 1252.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list