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. Unicode & CString

Unicode & CString

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structures
3 Posts 3 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.
  • S Offline
    S Offline
    Sachinpatole
    wrote on last edited by
    #1

    Hi, I am developing my application in VS2005 MFC. I have selected multi-byte charater set in project settings, now i need to save/copy japanese string from TCHAR array into CString variable without changing multi-byte charater encoding to unicode encoding in project settings. Sachin P.

    M M 2 Replies Last reply
    0
    • S Sachinpatole

      Hi, I am developing my application in VS2005 MFC. I have selected multi-byte charater set in project settings, now i need to save/copy japanese string from TCHAR array into CString variable without changing multi-byte charater encoding to unicode encoding in project settings. Sachin P.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      A CString holds TCHARs, so you don't need to do anything special. Just assign your TCHAR array to a CString variable.

      --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Dunder-Mifflin, this is Pam.

      1 Reply Last reply
      0
      • S Sachinpatole

        Hi, I am developing my application in VS2005 MFC. I have selected multi-byte charater set in project settings, now i need to save/copy japanese string from TCHAR array into CString variable without changing multi-byte charater encoding to unicode encoding in project settings. Sachin P.

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        To add to Michael's reply... If the Japanese string is Unicode then you don't want to store it in a TCHAR array. It should be in a wchar_t array. Then use a CStringW instead of a generic CString. Mark

        "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

        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