Re: Windows IME support mysteries


Subject: Re: Windows IME support mysteries
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Sun Apr 15 2001 - 20:57:33 CDT


Leonard Rosenthol wrote:
>
> At 11:00 PM 4/15/2001 +1000, Andrew Dunbar wrote:
> >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.
>
> What font is current at the time?
>
> One thing that MAY be the issue is that IDE's tend to use the
> current font to determine what code page/encoding to convert into when
> returning information. If the font is one that is "Unicode", it may then
> fall back to the default language unless told otherwise. See what happens
> if you have switch fonts.

Well fonts, on Windows at least, need more work for internationalization
but this is mostly unrelated to input. Times Roman is always set at
startup time no matter the input language. But Times Roman does not
support CJK characters. The current font *does not* affect the input.
It merely means that unsupported characters are displayed as empty
boxes. If you select these and change the font to say Arial Unicode
MS, which supports almost everything, they'll be displayed correctly.

> >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.
>
> We should see if there is some way to get the Unicode directly
> rather than all the conversion...

In fact I've found that calling the WCHAR version of the function
that retrieves the IME composed string does just this. I'm still
looking into the best way to determine whether this function exists
at runtime and the best way to insert the string into the document.

Andrew.

-- 
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 - 20:55:55 CDT