http://qs1969.pair.com?node_id=908563


in reply to Re^2: Is there a way to make Prima widgets accept double byte characters?
in thread Is there a way to make Prima widgets accept double byte characters?

I was reluctant to get inside CIJK because I somehow thought that I have to have a real chinese keyboard, but I gave it a go and installed Chinese layout and lo, I could type unicode! Miracle ))

Well anyway, yes, WM_CHAR was an easy spot, but strangely enough it only conveyed question mark symbols, never the real chars. Same with WM_IME_CHAR. Finally I found a working method, from GTK - they catch WM_IME_COMPOSITION and explicitly extract the chars by calling ImmGetCompositionStringW.

I've tried that too, but after typing a test char the Chinese IME died and refused to come up :) Again, thinking that usually IME-aware apps use wide-char win32 API, I've changed calls to RegisterClass and CreateWindow to their wide-char counterparts, and that seemingly helped.

So I've committed the change, but the problem is, I have no knowledge of Chinese, and my semi-random key strokes that produce a seemingly ok chiniese character doesn't mean that the input is accepted correctly. It seems so, but I'm not 100% sure. So if anyone's willing, you're more than welcome grab the latest Prima from github ( https://github.com/dk/Prima ) and see if that works for your favourite language and IME.