Subject: Windows IME support mysteries
From: Andrew Dunbar (email@example.com)
Date: Sun Apr 15 2001 - 08:00:10 CDT
Just to follow myself up, I've done some experiments with the Windows
200 IME. I've implemented a hook for WM_IME_COMPOSITION thinking it
would solve the problem with WM_IME_CHAR by giving me the whole
MBCS string in one hit.
This it does - but - Windows has already secretly *converted* the
string from whatever language I input into the machine's default
Hence I feel that my patch probably works perfectly as is on pre
2000 OSes but on 2000 where you can change languages at will there
must something I have to do to make these old messages, which depend
on the machine having one input locale only, work with multiple
If this does not make sense, here is an example:
Set the default language to Traditional Chinese. Reboot.
Run AbiWord. Select Traditional Chinese IME (and appropriate font).
Type r - e - n - space. You'll get the character for "man".
Hit enter and the "man" character appears in your document.
Now select Japanese IME.
Type h - i - t - o - space. You'll get the same character for "man".
Hit enter and rubbish appears in your document.
If you look at the bytes - you've actually been given the BIG5
bytes and not the SJIS bytes. _emitChar/iconv expects SJIS bytes so
they get translated using the wrong tables.
If you try to enter Hiragana, Katakana, or Korean Hangul, you'll
just get "?" characters since these are language specific.
I'm pretty sure the exact "implicit conversion" is happening with
Okay so that's the treatise on the problem - does anybody know
what special trickery is required on Windows 2000?
-- http://linguaphile.sourceforge.net _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
This archive was generated by hypermail 2b25 : Sun Apr 15 2001 - 07:58:33 CDT