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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. unicode application

unicode application

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelpquestion
7 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.
  • T Offline
    T Offline
    tom groezer
    wrote on last edited by
    #1

    I have an application that is running on a japanese machine and it seems that the code in that application is not working properly. It is having a char a[256] array and it looks like the char array is not getting populated with a string. In all strcpy(a, "test is here") is not working. Is this something related to unicode stuff on japanese locale. Will usage of tchar solve the problem?

    D E 2 Replies Last reply
    0
    • T tom groezer

      I have an application that is running on a japanese machine and it seems that the code in that application is not working properly. It is having a char a[256] array and it looks like the char array is not getting populated with a string. In all strcpy(a, "test is here") is not working. Is this something related to unicode stuff on japanese locale. Will usage of tchar solve the problem?

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

      tom groezer wrote:

      Will usage of tchar solve the problem?

      Have you tried it to see?

      "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      1 Reply Last reply
      0
      • T tom groezer

        I have an application that is running on a japanese machine and it seems that the code in that application is not working properly. It is having a char a[256] array and it looks like the char array is not getting populated with a string. In all strcpy(a, "test is here") is not working. Is this something related to unicode stuff on japanese locale. Will usage of tchar solve the problem?

        E Offline
        E Offline
        Eytukan
        wrote on last edited by
        #3

        tom groezer wrote:

        Will usage of tchar solve the problem?

        But you will have to replace those functions with equivalent _tcs functions. If you want to completely move to UNICODE and no looking back, you can choose wchar_t and the corresponding wcs functions.

        He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

        T 1 Reply Last reply
        0
        • E Eytukan

          tom groezer wrote:

          Will usage of tchar solve the problem?

          But you will have to replace those functions with equivalent _tcs functions. If you want to completely move to UNICODE and no looking back, you can choose wchar_t and the corresponding wcs functions.

          He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

          T Offline
          T Offline
          tom groezer
          wrote on last edited by
          #4

          Application uses multibyte character set but the symbol _UNICODE is not defined. Nit sure if the LOCALE Japanese can make the application to run in Unicode format?

          E 1 Reply Last reply
          0
          • T tom groezer

            Application uses multibyte character set but the symbol _UNICODE is not defined. Nit sure if the LOCALE Japanese can make the application to run in Unicode format?

            E Offline
            E Offline
            Eytukan
            wrote on last edited by
            #5

            tom groezer wrote:

            Application uses multibyte character set but the symbol _UNICODE is not defined

            You mean "And"? When you declare, MBCS, you should not use UNICODE. And Japanese letter would work with UNICODE. Remove MBCS if you had defined in your settings. and add UNICODE,_UNICODE.

            He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

            T 1 Reply Last reply
            0
            • E Eytukan

              tom groezer wrote:

              Application uses multibyte character set but the symbol _UNICODE is not defined

              You mean "And"? When you declare, MBCS, you should not use UNICODE. And Japanese letter would work with UNICODE. Remove MBCS if you had defined in your settings. and add UNICODE,_UNICODE.

              He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

              T Offline
              T Offline
              tom groezer
              wrote on last edited by
              #6

              Sorry to not make you understand. The project uses MBCS settings. It can't be set to unicode settings. I was thinking if this app is made to run on a japanese m/c is there a way that locale settings could turn the application to be unicode aware.Is that is the case, since my application code used char array and strcpy function would it make it compulsory to change the application code to use -tcscpy and tchar array. This application code works perfectly on a my system.

              J 1 Reply Last reply
              0
              • T tom groezer

                Sorry to not make you understand. The project uses MBCS settings. It can't be set to unicode settings. I was thinking if this app is made to run on a japanese m/c is there a way that locale settings could turn the application to be unicode aware.Is that is the case, since my application code used char array and strcpy function would it make it compulsory to change the application code to use -tcscpy and tchar array. This application code works perfectly on a my system.

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #7

                tom groezer wrote:

                Sorry to not make you understand. The project uses MBCS settings. It can't be set to unicode settings.

                Then use the character mapping routines in tchar.h. It'll handle MBCS, Unicode, or ANSI. Just learn the equivalent string functions for it.

                tom groezer wrote:

                This application code works perfectly on a my system.

                Probably because your system isn't a Japanese one. Just use the character mapping routines in tchar.h and you'll be ok.

                Jeremy Falcon jeremyfalcon.com[^]

                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