Piotr Caban : kernel32: Restore C locale for LC_CTYPE category.
Ken Thomases
ken at codeweavers.com
Wed Mar 20 10:25:29 CDT 2019
On Mar 20, 2019, at 10:02 AM, Chip Davis <cdavis at codeweavers.com> wrote:
>
> March 20, 2019 9:58 AM, "Ken Thomases" <ken at codeweavers.com> wrote:
>
>> On Mar 20, 2019, at 8:28 AM, Piotr Caban <piotr.caban at gmail.com> wrote:
>>
>>> I've looked for the solution of this problem and I failed to find one that works with C locale. It
>>> looks like XIM is not working when it's initialized in C or POSIX locale even if wchar_t or utf8
>>> variant of lookup functions is used (XwcLookupString, Xutf8LookupString).
>>
>> […]
>>> I see 2 possible solutions for that:
>>> - go with the ascii_{tolower,toupper,strcasecmp,strncasecmp} helpers and use them instead of glibc
>>> functions
>>
>> What about the xlocale functions (e.g. tolower_l())? If you pass a NULL locale_t to them, they
>> operate in the C locale.
>
> Only the POSIX ones do that. The Microsoft ones use the global locale. Also, I suspect those functions aren't available everywhere--even though POSIX 2008 has been a thing for over a decade.
But aren't we only interested in changing the behavior of the POSIX ones?
An alternative approach might be to leave LC_CTYPE set to the C locale but wrap the XIM functions in uselocale() calls to set the locale to the one that Wine had been using before this change and then set it back. I don't know if that will be enough to get things to work.
-Ken
More information about the wine-devel
mailing list