Abdelrazak Younes wrote: > 한창길 wrote: >> Hello, >> >>> What is the size of text_? >> >>> In my windows box, text_.size()=2, but in my linux box text_.size()=1 >>> for the same >character. It should be one in any case. >> >> Nope. I got "text_size()=2" in my windows box, from inserting >> >> "lyxerr << "text_.size()=" << text_.size() << endl;" >> >> just before "BOOST_ASSERT(text_.size() == 1);" in QLyXKeySym.C. > > Yes, that's exactly what I said ;-). The problem is that for some > reason, the keyboard input which is of 2 bytes size (ucs2) is converted > to two 4-bytes chars (in ucs4); and this is clearly wrong.
This comes probably from text_ = ev->text(); so one has to read in the qt docs whether that is supposed to happen. BTW I had a quick look at this and fixed the return type of QLyXKeySym::getUCSEncoded. I also found strange code in LyXFunc::processKeySym and added a FIXME. Does anybody have an idea why this code is like it is? Georg