On Tue, 26 Jul 2005 16:31:50 +0900
"Dmitry Timoshkov" <dmitry(a)baikal.ru> wrote:
"Phil Krylov" <phil(a)newstar.rinet.ru>
wrote:
This
patch is not correct. All messages which potentially go through wineserver
should be posted/sent via unicode.
OK, then how you would suggest to solve the problem described in previous
messages of this thread?
One solution is to translate the whole wparam.
How do you see it? Example: I do a
PostMessageA(hwndAnsi, WM_CHAR, 0xF301, 0);
map_wparam_AtoW takes the "\x01\xF3" string, translates it to Unicode via
CP_ACP (for CP1251, this would be probably {'\x01', 0x443})... and how
does it fit this info back in LOWORD(wParam)?
AFAIK in DBCS
two separate messages are used.
A test under Windows would say it for sure.
I can't test it as I don't have a Windows with DBCS locales installed, but
Internet says:
When entering non-ASCII characters on systems with
DBCS input
locales, the lead byte and trail byte for the DBCS character are passed
in two successive WM_CHAR messages. So we are better off processing
WM_IME_CHAR messages because we get both bytes at once. If we move to
Unicode, however, we'll directly get UTF-16 in WM_CHAR; or on XP: UTF-32
in WM_UNICHAR.
-- Ph.