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. Data type?

Data type?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
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.
  • W Offline
    W Offline
    wow9999
    wrote on last edited by
    #1

    Hi everybody I have a Chinese sentence;for example,"大家好", I don't know which kind of Data types I can use to assign this sentence to. I use CString, but it does not work. and the UNIT only read one word. Thanks

    R P A 3 Replies Last reply
    0
    • W wow9999

      Hi everybody I have a Chinese sentence;for example,"大家好", I don't know which kind of Data types I can use to assign this sentence to. I use CString, but it does not work. and the UNIT only read one word. Thanks

      R Offline
      R Offline
      RChin
      wrote on last edited by
      #2

      You'll need to probably make your program UNICODE aware. CString will automatically use TCHAR's (wide characters) to store your string. Have a gandar at Chris's article : http://www.codeproject.com/cpp/unicode.asp?target=unicode[^] **I Dream of Absolute Zero


      **

      1 Reply Last reply
      0
      • W wow9999

        Hi everybody I have a Chinese sentence;for example,"大家好", I don't know which kind of Data types I can use to assign this sentence to. I use CString, but it does not work. and the UNIT only read one word. Thanks

        P Offline
        P Offline
        PengFeidu
        wrote on last edited by
        #3

        hi Maybe your computer donot support Big5 code. CString is a good idea to process string. if you can't use it. I suggest that: to vc, char also is integer type, so you can do it as follow: static DWORD szChar[]={"你好嘛?"} hope a little help for you! dupengfei

        1 Reply Last reply
        0
        • W wow9999

          Hi everybody I have a Chinese sentence;for example,"大家好", I don't know which kind of Data types I can use to assign this sentence to. I use CString, but it does not work. and the UNIT only read one word. Thanks

          A Offline
          A Offline
          Abin
          wrote on last edited by
          #4

          CString does work on Chinese characters even without _UNICODE being defined, if the operating system is able to display them. You can try: CString str(_T("大家好")); // Do type the quotation marks in English! AfxMessageBox(str); Compile and link the code on a Chinese operating system and it will work.

          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