Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

listview codepage

1 view
Skip to first unread message

Chris Becke

unread,
Sep 14, 2005, 10:07:25 AM9/14/05
to
I have been, with much success, ignorning localization issues in my
applications.

Now, it turns out that the app is being localized to chinese - and all my
dialogs are working great, with the exception of listviews.

My app is written as an ANSI app - But I load strings from unicode string
tables and convert them using WideCharToMultiByte with the CP_ACP codepage.
All chinese strings loaded this way work great when I splat them onto
standard dialog controls on a far eastern system using SetWindowTextA.

Now, the problem is, when I try to insert items into a listview, the chinese
text becomes corrupted. This I have traced to the fact that the Listview -
natively unicode- takes my CP_ACP multibyte strings, and does a
MultiByteToWideChar conversion, but it uses a codepage of 936 -
co-incidentally the simplified chinese codepage. However, all my bytevalues
assume that CP_ACP will be used when converting up to unicode, so the
listview displays garbage.

Now, the simplest fix for me is to use the unicode versions of the Listview
functions to directly insert the unicode versions of the chinese strings -
but that implies rather wide ranging application changes. Is there anyway to
change the code-page that the ansi versions of the list view functions will
do their conversions with?


0 new messages