Subject: Patch: Bug 528
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Mon Jun 11 2001 - 06:32:41 CDT
So now all keys will work for Windows Slovak keyboard.
Characters that mapped from non-unicode input locale to unicode chars
(outside latin 1 range) were being truncated.
Andrew Dunbar.
-- http://linguaphile.sourceforge.net
Index: src/af/ev/win/ev_Win32Keyboard.cpp =================================================================== RCS file: /cvsroot/abi/src/af/ev/win/ev_Win32Keyboard.cpp,v retrieving revision 1.25 diff -u -r1.25 ev_Win32Keyboard.cpp --- src/af/ev/win/ev_Win32Keyboard.cpp 2001/06/07 15:51:42 1.25 +++ src/af/ev/win/ev_Win32Keyboard.cpp 2001/06/11 11:26:20 @@ -31,6 +31,7 @@ #include "ev_EditMethod.h" #include "ev_EditBinding.h" #include "ev_EditEventMapper.h" +#include "xap_EncodingManager.h" #ifdef UT_DEBUG #define MSG(keydata,args) do { if ( ! (keyData & 0x40000000)) UT_DEBUGMSG args ; } while (0) @@ -193,11 +194,12 @@ if( GetLocaleInfo( LOWORD( hKeyboardLayout ), LOCALE_IDEFAULTANSICODEPAGE, &szCodePage[2], sizeof( szCodePage ) / sizeof( szCodePage[0] ) - 2 ) ) { // Unicode locale? - // TODO Does NT use UCS-2-BE internally on non-Intel CPUs? if( !strcmp( szCodePage, "CP0" ) ) { + const char *szUCS2Name = XAP_EncodingManager::get_instance()->getNativeUnicodeEncodingName(); + UT_ASSERT(szUCS2Name); m_bIsUnicodeInput = true; - strcpy( szCodePage, "UCS-2-LE" ); + strcpy( szCodePage, szUCS2Name ); } else m_bIsUnicodeInput = false; @@ -559,7 +561,7 @@ } EV_EditMethod * pEM; - EV_EditEventMapperResult result = m_pEEM->Keystroke(EV_EKP_PRESS|ems|b,&pEM); + EV_EditEventMapperResult result = m_pEEM->Keystroke(EV_EKP_PRESS|ems|charData[0],&pEM); switch (result) {
_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
This archive was generated by hypermail 2b25 : Mon Jun 11 2001 - 06:30:24 CDT