Re: codepages on Windows

From: Peter_Constable@sil.org
Date: Fri Aug 11 2000 - 09:36:42 EDT


>wParam of WM_INPUTLANGCHANGE *is* the codepage ID (that you can pass
>to MultiByteToWideChar(), for example).

I believe wParam gives a charset id, not a codepage id. There's a
difference. I wasn't sure how one gets codepage from charset (short of
maintaining a table).

Unfortunately, the MSDN library page on WM_INPUTLANGCHANGE doesn't
reference under "See also" either TranslateCharsetInfo or GetLocaleInfo.
Neither does it say anything under "Remarks". It seems to me that somewhere
they should provide more help in knowning how an ANSI-registered app can
handle Unicode characters, in this case how to take characters received
from WM_CHAR (or pairs from WM_IME_CHAR) and translate them using
MultiByteToWide, for which the codepage associated with the current
InputLocale must be known. Kano's book also doesn't discuss this, neither
does the recent MSPress book International Programming for MS Windows by
David Schmitt.

- Peter

---------------------------------------------------------------------------
Peter Constable

Non-Roman Script Initiative, SIL International
7500 W. Camp Wisdom Rd., Dallas, TX 75236, USA
Tel: +1 972 708 7485
E-mail: <peter_constable@sil.org>



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:06 EDT