IME withTix on multilanguagesupported system ?

vincent wehren v.wehren at home.nl
Mon Mar 3 06:06:58 EST 2003


Martin v. Löwis" <martin at v.loewis.de> schrieb im Newsbeitrag
news:m38yvwg5td.fsf at mira.informatik.hu-berlin.de...
> "vincent wehren" <v.wehren at home.nl> writes:
>
> > I doubt that any IME will provide the right results in Tix as long as
the
> > default setting on his W2K machine is Russian (CP866/ACP1251). Doesn't
Tk
> > use the current encoding to internalize into unicode?
>
> I missed that point, and it has its merits. However, in Tk 8.4,
> win/tkWinKey.c, I find
>
>     } else if (eventPtr->xkey.send_event == -2) {
>         /*
>          * Special case for win2000 multi-lingal IME input.
>          * xkey.trans_chars[] already contains a UNICODE char.
>          */
>
>         int unichar;
>         char buf[TCL_UTF_MAX];
>         int len;
>
>         unichar = (eventPtr->xkey.trans_chars[1] & 0xff);
>         unichar <<= 8;
>         unichar |= (eventPtr->xkey.trans_chars[0] & 0xff);
>
>         len = Tcl_UniCharToUtf((Tcl_UniChar) unichar, buf);
>
>         Tcl_DStringAppend(dsPtr, buf, len);
>     } else  {
>
> So it *looks* like it could work "correctly" in some cases. It appears
> that this processing occurs when WM_IME_COMPOSITION has been received
> before (*). I don't know under what circumstances that would happen,
> though. W2k seems to be a prerequisite, but there are probably more
> prerequisites (like using an IME with composition, whatever that is).
>
> Regards,
> Martin

Maybe original poster could also explain *why* he needs an "Input Method
Editor" for Vietnamese - as Vietnamese - and this just occurred to me - is
just a regular keyboard mapping on Windows? Vietnamese is a non-complex ,
single-byte character set (at least on W2K where both CP and ACP are
1258)....

I am getting the strong  feeling that if he'd switch the default language
settings on his system (control panel > regional options > General >
Language settings for the system > Vietnamese (needs to be "checked") > Set
Default) and reboot it just might work...(typing chcp in the command prompt
should now yield cp1258). As the encoding package includes CP1258.py it
would also be painless to store the input to a byte-oriented storage...
Regards
Vincent





>
> (*) On W2k, Tk will invoke ImmGetCompositionStringW in this case; on
> W98, it will invoke ImmGetCompositionStringA.






More information about the Python-list mailing list