[PATCH] msvcrt: Support .OCP locale.
Piotr Caban
piotr.caban at gmail.com
Thu Sep 17 08:10:40 CDT 2020
Hi Paul,
On 9/17/20 2:44 PM, Paul Gofman wrote:
> + } else if (locale[0] == '.' && locale[1] == 'O' && locale[2] == 'C' && locale[3] == 'P' && !locale[4]) {
It's not ".OCP" locale - it's default system locale with OCP codepage.
You can e.g. call setlocale(LC_ALL, "polish.OCP"); This needs to be
handled in MSVCRT_locale_to_LCID helper.
> + GetLocaleInfoA(lcid[0], LOCALE_IDEFAULTCODEPAGE, buf, sizeof(buf));
> + cp[0] = atoi(buf);You can probably use LOCALE_RETURN_NUMBER here.
> + ret = setlocale(LC_ALL, ".OCP");
> + ok(ret != NULL, "ret == NULL\n");
> + if(ret) {
This if looks redundant (I assume setlocaleLC_ALL, ".OCP") never fails
on Windows since there's no broken case in ok call).
Thanks,
Piotr
More information about the wine-devel
mailing list