Huw Davies : user32: Use the codepage associated with the input locale for WM_CHAR-type conversions .
Module: wine Branch: master Commit: 5d5d0935ea5469e32b33c8b9c968f7b2d66f3d70 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5d5d0935ea5469e32b33c8b9c9... Author: Huw Davies <huw(a)codeweavers.com> Date: Tue May 21 12:51:22 2013 +0100 user32: Use the codepage associated with the input locale for WM_CHAR-type conversions. --- dlls/user32/message.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 24588ac..a6a839c 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -586,7 +586,14 @@ static BOOL CALLBACK broadcast_message_callback( HWND hwnd, LPARAM lparam ) DWORD get_input_codepage( void ) { - return CP_ACP; + DWORD cp; + int ret; + HKL hkl = GetKeyboardLayout( 0 ); + + ret = GetLocaleInfoW( LOWORD(hkl), LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, + (WCHAR *)&cp, sizeof(cp) / sizeof(WCHAR) ); + if (!ret) cp = CP_ACP; + return cp; } /***********************************************************************
participants (1)
-
Alexandre Julliard