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. character size more than 2 bytes

character size more than 2 bytes

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpc++visual-studio
9 Posts 7 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.
  • P Offline
    P Offline
    parag
    wrote on last edited by
    #1

    Hello I want to develop a software in vc++ which takes character size more than 2 bytes. It means I cannot use UNICODE . What settings should I use in Visual Studio or how can I use character size more than 2 bytes ?

    V S T H 4 Replies Last reply
    0
    • P parag

      Hello I want to develop a software in vc++ which takes character size more than 2 bytes. It means I cannot use UNICODE . What settings should I use in Visual Studio or how can I use character size more than 2 bytes ?

      V Offline
      V Offline
      vikramlinux
      wrote on last edited by
      #2

      Is there any special case where u need more than 2 bytes to store character?

      1 Reply Last reply
      0
      • P parag

        Hello I want to develop a software in vc++ which takes character size more than 2 bytes. It means I cannot use UNICODE . What settings should I use in Visual Studio or how can I use character size more than 2 bytes ?

        S Offline
        S Offline
        soundman32
        wrote on last edited by
        #3

        What language are you trying to store? Unicode handles every language available on the planet (including Klingon, Vulcan and Welsh) with a lot of room left for new languages. So unless you have invented some new language, UNICODE will work. What are you actually trying to do? Neil

        P H 2 Replies Last reply
        0
        • P parag

          Hello I want to develop a software in vc++ which takes character size more than 2 bytes. It means I cannot use UNICODE . What settings should I use in Visual Studio or how can I use character size more than 2 bytes ?

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

          are there any special reasons for that you could explain fully here ? UNICODE provides 2 bytes per character, that allow you to have 65535 different characters in the same "set", which is large enough to represent all the characters of the world... :cool:


          TOXCCT >>> GEII power
          [toxcct][VisualCalc]

          T 1 Reply Last reply
          0
          • S soundman32

            What language are you trying to store? Unicode handles every language available on the planet (including Klingon, Vulcan and Welsh) with a lot of room left for new languages. So unless you have invented some new language, UNICODE will work. What are you actually trying to do? Neil

            P Offline
            P Offline
            parag
            wrote on last edited by
            #5

            ok thanks I thought that there might be a case where I have to handle more than 2 bytes size and the software should not fail. anyways Is this possible or impossible ?

            P 1 Reply Last reply
            0
            • T toxcct

              are there any special reasons for that you could explain fully here ? UNICODE provides 2 bytes per character, that allow you to have 65535 different characters in the same "set", which is large enough to represent all the characters of the world... :cool:


              TOXCCT >>> GEII power
              [toxcct][VisualCalc]

              T Offline
              T Offline
              Thomas Haller
              wrote on last edited by
              #6

              hmmm - does it support those elven-characters from Lord of the Rings ? :suss:

              1 Reply Last reply
              0
              • P parag

                ok thanks I thought that there might be a case where I have to handle more than 2 bytes size and the software should not fail. anyways Is this possible or impossible ?

                P Offline
                P Offline
                Prakash Nadar
                wrote on last edited by
                #7

                Answer is simply no. you cant do it in VC++ atleast, but you can always design your application to store more than 2 byte per char, but none of the windows api will be of any use coz they accept either ascii or unicode character set.


                -prakash

                1 Reply Last reply
                0
                • S soundman32

                  What language are you trying to store? Unicode handles every language available on the planet (including Klingon, Vulcan and Welsh) with a lot of room left for new languages. So unless you have invented some new language, UNICODE will work. What are you actually trying to do? Neil

                  H Offline
                  H Offline
                  Henry miller
                  wrote on last edited by
                  #8

                  The 32 bit versions of unicode handle everything. The 16 bit versions miss a lo. (mostly Asain languages where there are a different symbol for each word) Windows is mostly 16 bit unicode. UCS-8 (which is common on unix) is variable size, IIRC it can use up to 6 bytes, or as little as 1.

                  1 Reply Last reply
                  0
                  • P parag

                    Hello I want to develop a software in vc++ which takes character size more than 2 bytes. It means I cannot use UNICODE . What settings should I use in Visual Studio or how can I use character size more than 2 bytes ?

                    H Offline
                    H Offline
                    Henry miller
                    wrote on last edited by
                    #9

                    Yes you can use unicode. However you cannot use the uncode functions built into windows, because they use UCS-2 which is only 16 bit. I would typedef unsigned long to something like my_unicode_type, so that if you come up with something better latter you only need to change your type in one place. This depends though, if you are writting a class to wrap everything it might not be required.

                    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