-----BEGIN PGP SIGNED MESSAGE-----
On Sonntag, 8. Dezember 2002 20:39, John Levon wrote:
> On Sun, Dec 08, 2002 at 08:01:20PM +0100, Kornel Benko wrote:
> > So, next patch attached.
>
> - text_ = ev->text();
> + {
> + QString s = ev->text();
> + lyxerr[Debug::KEY] << " unicode of key is";
> + for (int i = 0; i < s.length(); ++i) {
> + QChar const a = s.ref(i);
> + lyxerr[Debug::KEY] << " " << int(a);
> + }
> + if (!s.isEmpty()) {
> + lyxerr[Debug::KEY] << " ascii == " << ev->ascii();
> + }
> + lyxerr[Debug::KEY] << endl;
>
> Just for debugging ...
>
> + if ((s.length() == 1) && ( key_ == Qt::Key_unknown)) {
>
> So, if it's one key long but unknown, then :
>
> + if ((int) s.ref(0) == 0) {
>
> if the first char is 0 ? Are you saying that zcaron keypress returns a
> Qt_unknown key *and* the ev->text() is useless ??? That would be a serious
> bug. What is your locale set to ??
That is exactly, what I see here.
LANG=en
> + s = ev->ascii();
>
> use ascii ?
Recommended is text(), but it did not work.
> + key_ = 0;
> + }
> + }
> + text_ = s;
>
>
> I do not understand this at all. First, why are you checking for
> Key_unknown ? Second, what is the meaning of the check against 0 ?
I do not want conflicts with latin-1. All latin-1 char had key != 65535 or text()[0]
!= 0
> This seems to just be a side-consequence of what happens when you call
> ->ascii() on a character outside of 7-bit ASCII. It does not seem reliable
> or sensible. What we really need is to convert the unicode QChar in
> getISOEncoded() to the correctly-encoded 8-bit value. So we need logic to
> do that.
Yes, but there is no unicode character I could catch.
> If you ask, I'm sure someone here can tell you what you need to do
> (something with Encoding class I think) ...
I am asking ...
Please, does anybody know?
Kornel
- --
Kornel Benko
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQCVAwUBPfOnN7ewfbDGmeqhAQHh4gQAnYvea7UgucnU5d1lH6WnDZ610OITjOjK
JhMuaZuup8TlOEpmDa9IUDm92o2cN5j5ItEtTkglpV3k1D1YYep4hw/QVqZJggWi
3RRDM2aAnslI1+6fSE7erBjLrEMNJ+G8+W0sNbZU/0CKust4o9ZYcM6x2Y/u4aON
iDyOTjuYqRc=
=9ko5
-----END PGP SIGNATURE-----