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. Converting projetc to unicode support

Converting projetc to unicode support

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

    Hi I want my application to convert to unicode support so for this is it necessary to convert all char data type to TCHAR and after conversion my application will it support ASCII characters? Thanks and Regards M.Atul M.Atul

    L M 2 Replies Last reply
    0
    • A Atul23

      Hi I want my application to convert to unicode support so for this is it necessary to convert all char data type to TCHAR and after conversion my application will it support ASCII characters? Thanks and Regards M.Atul M.Atul

      L Offline
      L Offline
      Leah_Garrett
      wrote on last edited by
      #2

      To convert a C++ applicaiton to Unicode define UNICODE (add it the list where you have DEBUG etc). We used the generic text _TCHAR because we wanted to be able to make non-Unicode builds. Check out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_unicode_programming_tasks.asp[^]

      S 1 Reply Last reply
      0
      • A Atul23

        Hi I want my application to convert to unicode support so for this is it necessary to convert all char data type to TCHAR and after conversion my application will it support ASCII characters? Thanks and Regards M.Atul M.Atul

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

        To add to Leah_Garrett's reply... If you use TCHAR types and the associated string functions (_tcscpy(), _tcscmp(), etc.) you'll be able to use the same code for both unicode and non-unicode builds. You can still use single-byte ASCII ("char" type) in a unicode build but you'll need to use the type explicitly. Mark

        1 Reply Last reply
        0
        • L Leah_Garrett

          To convert a C++ applicaiton to Unicode define UNICODE (add it the list where you have DEBUG etc). We used the generic text _TCHAR because we wanted to be able to make non-Unicode builds. Check out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_unicode_programming_tasks.asp[^]

          S Offline
          S Offline
          Stephen Hewitt
          wrote on last edited by
          #4

          You should define both UNICODE and _UNICODE. The former is for the Windows include files and the latter for the CRT. See here[^].

          Steve

          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