Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. wchat_t to normal char

wchat_t to normal char

Scheduled Pinned Locked Moved C / C++ / MFC
toolshelpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RichardS
    wrote on last edited by
    #1

    Hi All, I have an utility programme that uses wchar_t. However interfacing to our programme which uses char's is a problem. How does one convert to wchar_t to char, and visa versa? regards, Rich "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far the Universe is winning." -- Rich Cook

    D N T 3 Replies Last reply
    0
    • R RichardS

      Hi All, I have an utility programme that uses wchar_t. However interfacing to our programme which uses char's is a problem. How does one convert to wchar_t to char, and visa versa? regards, Rich "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far the Universe is winning." -- Rich Cook

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Check out the W2A() and A2W() macros.


      "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

      "There is no death, only a change of worlds." - Native American Proverb

      1 Reply Last reply
      0
      • R RichardS

        Hi All, I have an utility programme that uses wchar_t. However interfacing to our programme which uses char's is a problem. How does one convert to wchar_t to char, and visa versa? regards, Rich "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far the Universe is winning." -- Rich Cook

        N Offline
        N Offline
        Nemanja Trifunovic
        wrote on last edited by
        #3

        RichardS wrote:

        How does one convert to wchar_t to char

        WideCharToMultiByte[^]

        RichardS wrote:

        and visa versa

        MultiByteToWideChar[^]


        My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

        1 Reply Last reply
        0
        • R RichardS

          Hi All, I have an utility programme that uses wchar_t. However interfacing to our programme which uses char's is a problem. How does one convert to wchar_t to char, and visa versa? regards, Rich "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far the Universe is winning." -- Rich Cook

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          wctomb and mbtowc

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups