Georg Baum wrote:
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.
I suspect there is something wrong happening in
GuiWorkArea::inputMethodEvent(). I never managed to understand what this
method was about but it is related to asian languages apparently.
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?
Last time I touched it (because it seems that the local shadow variable
is not needed at all), Lars said that I didn't know what I was doing so
I just let it there.
Abdel.