Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2004
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Porting MultiByteToWideChar to Unix

    Hi,

    I would need to port the WinAPI functions MultiByteToWideChar and WideCharToMultiByte to Unix.
    Specifically, the call is :
    MultiByteToWideChar(CP_ACP, 0, AnsiStr, -1, UnicodeStr, sizeof(UnicodeStr));

    I know that mbcstowcs() call should help me in the porting but I do not know how to handle the first parameter CP_ACP in Unix ie. setting the code page to Ansi .

    Should it be done by calling setlocale(LC_CTYPE,"") or is there any other method ?

    Any help will be highly appreciated

    Thanks,

  • #2
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know how to port MultiByteToWideChar to Unix, sorry.

    But "iconv" system call in Unix should be easy to use to do the same thing. For detail, try

    man 3 iconv
    and
    iconv -l

    Hope this help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •