user32: Use the codepage associated with the input locale for WM_CHAR-type conversions.

This commit is contained in:
Huw Davies 2013-05-21 12:51:22 +01:00 committed by Alexandre Julliard
parent bf85df3f0e
commit 5d5d0935ea

View File

@ -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;
}
/***********************************************************************