On Thu, May 02, 2002 at 02:03:06AM -0400, Jungshik Shin wrote: > I know very little about Win32 APIs, but according to what little > I learned from Mozilla source code, it doesn't seem to be so simple as > you wrote in Windows, either. Actually, my impression is that Windows > IME APIs are almost parallel (concept-wise) to those of XIM APIs. (btw, > MS WIndows XP introduced an enhanced IM related APIs called TSF?.) In > both cases, you have to determine what type of preediting support > (in XIM terms, over-the-spot, on-the-spot, off-the-spot and none?) > is shared by clients and IM server. Depending on the preediting type, > the amount of works to be done by clients varies. > > I'm afraid your impression that Windows IME clients have very little > to do to get keyboard input comes from your not having written programs > that can accept input from CJK IME(input method editors) as it appears > to be confirmed by what I'm quoting below.
I wrote the patch for PuTTY to accept input from Win2K's IME, and some fixes for Vim's. What I said is all that's necessary for simple support, and the vast majority of applications don't need any more than that. Of course, what you do with this input is up to the application, and if you have no support for storing anything but text in the system codepage, there might be a lot of work to do. That's a different topic entirely, of course. > It just occurred to me that Mozilla.org has an excellent summary > of input method supports on three major platforms (Unix/X11, MacOS, > MS-Windows). See > > http://www.mozilla.org/projects/intl/input-method-spec.html. I've never seen any application do anything other than what this describes as "Over-The-Spot composition". This includes system dialogs, Word, Notepad and IE. This document incorrectly says: "Windows does not use the off-the-spot or over-the-spot styles of input." As far as I know, Windows uses *only* "over-the-spot" input. Perhaps on-the-spot can be implemented (and most people would probably agree that it's cosmetically better), but it would proably take a lot more work. Ex: http://zewt.org/~glenn/over1.jpg http://zewt.org/~glenn/over2.jpg (The rest of the first half of the document describes input styles that most programs don't use.) The document states "Last modified May 18, 1999", so the information on it is probably out of date. The only other thing you have to handle is described in "Platform Protocols": WM_IME_COMPOSITION. The other two messages can be ignored. The only API function listed here that's often needed is SetCaretPosition, to set the cursor position. > > It's little enough to add it easily to programs, but the fact that it > > exists at all means that I can't enter CJK into most programs. Since > > the regular 8-bit character message is in the system codepage, it's > > impossible to send CJK through. > > Even in English or any SBCS-based Windows 9x/ME, you > can write programs that can accept CJK characters from CJK (global) > IMEs. Mozilla, MS IE, MS Word, and MS OE are good examples. Yes, you're agreeing with what you quoted. -- Glenn Maynard -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
