Converting from Unicode to Multibyte

Discussion in 'C++' started by miner49er, Mar 13, 2006.

  1. miner49er

    miner49er Guest

    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
     
    miner49er, Mar 13, 2006
    #1
    1. Advertising

  2. miner49er

    Ron Natalie Guest

    miner49er wrote:
    > 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
    >

    You need to consult a microsoft group. C++ really only weakly glosses
    over internationalization issues. WideCharToMultibyte is a windows
    call.
     
    Ron Natalie, Mar 14, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Billow
    Replies:
    2
    Views:
    1,354
    Billow
    Dec 1, 2005
  2. kaith

    java multibyte char array

    kaith, Aug 21, 2003, in forum: Java
    Replies:
    3
    Views:
    3,881
    Jon A. Cruz
    Aug 21, 2003
  3. Hardik Tank

    Removing multibyte spaces

    Hardik Tank, Jul 20, 2004, in forum: Java
    Replies:
    5
    Views:
    840
    Hardik Tank
    Jul 22, 2004
  4. Zygmunt Krynicki

    Multibyte string length

    Zygmunt Krynicki, Oct 9, 2003, in forum: C Programming
    Replies:
    19
    Views:
    713
    Dan Pop
    Oct 14, 2003
  5. David Garamond
    Replies:
    8
    Views:
    363
Loading...

Share This Page