Connecting Tech Pros Worldwide Forums | Help | Site Map

Converting from Unicode to Multibyte

miner49er
Guest
 
Posts: n/a
#1: Mar 13 '06
Hi there,

Here's my problem, please help - I think i'm going insane :-)

I have written a DLL that returns Wide Char Unicode Chinese Strings.

I have a 3rd party Graph control (OCX) that requires Multibyte strings.

When I convert the Wide char to Multibyte, in the debugger they are

a) Seemingly random characters (with accents and stuff) if my "Regional
and Language Settings -> Standards and formats" is set to "Chinese
(Taiwan)".

b) A load of Question marks if regional settings are English.

If I send either of these to the 4rd party control, they appear as
Questions Marks.

So, basically, what is required to succesfully convert Wide Char to
Mutlibyte?

I've tried using the WideCharToMultiByte function but to no avail, what
could I be doing wrong?

Please, any help would be fantastic.

Cheers,

mat

Ron Natalie
Guest
 
Posts: n/a
#2: Mar 14 '06

re: Converting from Unicode to Multibyte


miner49er wrote:[color=blue]
> Hi there,
>
> Here's my problem, please help - I think i'm going insane :-)
>
> I have written a DLL that returns Wide Char Unicode Chinese Strings.
>
> I have a 3rd party Graph control (OCX) that requires Multibyte strings.
>
> When I convert the Wide char to Multibyte, in the debugger they are
>[/color]
You need to consult a microsoft group. C++ really only weakly glosses
over internationalization issues. WideCharToMultibyte is a windows
call.
Closed Thread