Abdelrazak Younes wrote:

> OK, I got it. But I think this is not the place to take care of that. At
> this level, there should be only one (or two in case of surrogate) utf16
> character. I think that the proper place to trim those superfluous
> characters is in 'GuiWorkArea::inputMethodEvent()'. Could you please
> have a look at this method? I guess we don't do all that is required to
> properly handle the input method.

> Out of curiosity, could you please give me the debug output of "lyx -dbg
> key" in order to see what is the value of the second character?

OK, here's the typical debug message which leads the crash,

"virtual void lyx::frontend::GuiWorkArea::inputMethodEvent(QInputMethodEvent*) 
preeditString = commitString  =ふじださふ
virtual void lyx::frontend::GuiWorkArea::keyPressEvent(QKeyEvent*) count=1 
text=ふじださふ isAutoRepeat=0 key=0
Setting key to 0, ふじださふ
KeySym is ふじださふ
isOK is 1
isMod is 0
text.size=5
Assertion triggered in virtual lyx::char_type lyx::QLyXKeySym::getUCSEncoded() 
const by failing check "text_.size() <= 2" in file QLyXKeySym.C:d4  ""

As you see, my input method can send any number of "text.size" characters at 
once.   So coding with "text.size"  seems dangerous as far as CJK languages are 
concerned. 

Regards,

cghan

Reply via email to