한창길 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. > > Configure also detects "size of wchar_t =2". This is another thing, this is about the memory size of wchar_t. On linux (and other supported platforms), our char_type is wchar_t because it has a 4 bytes size. On windows, wchar_t is only 2 bytes which is not enough for our needs (everything is ucs4 internally).
