In the method ev_UnixKeyboard::keyPressEvent, a "UT_Mbtowc" object
is used to convert multibyte sequence to wchar. However the declaration
of this "UT_Mbtowc" object is placed inside the conversion loop, which
means for every byte to be converted a new "UT_Mbtowc" object is
constructed. This effectively disables the conversion of
multibyte-encoded characters which requires accumulation of multiple
bytes. One visible consequence of this problem is that input for all CJK
languages fail to work in 0.9.4.1.

A patch is attached.

regards,
rigel


diff -u abi.orig/src/af/ev/unix/ev_UnixKeyboard.cpp 
abi/src/af/ev/unix/ev_UnixKeyboard.cpp
--- abi.orig/src/af/ev/unix/ev_UnixKeyboard.cpp Mon Sep 10 09:53:44 2001
+++ abi/src/af/ev/unix/ev_UnixKeyboard.cpp  Sun Oct  7 15:04:38 2001
@@ -185,10 +185,10 @@
             }
             else
             {
+               UT_Mbtowc m;
                 ucs=new UT_UCSChar[mLength];
                 for(int i=0;i<mLength;++i)
                 {
-                       UT_Mbtowc m;
                     wchar_t wc;
                     if(m.mbtowc(wc,mbs[i]))
                       ucs[uLength++]=wc;


Reply via email to