Thread: Ascii / Unicode

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    3
    Rep Power
    0

    Ascii / Unicode


    Hello,

    How important is it for me to learn how to use UNICODE with the Win32 API? cauze it's kind of confusing, and I don't like it....


    Should I bother?

    -cARL

    Comments on this post

    • JimmyGosling agrees
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    Depends on how much programming you intend to do. If you are only a hobbyist and you are directing your programs toward the Win9x platform, then you don't need to use UNICODE. But if your programs are going to run on NT/2k/XP, you need to use UNICODE (this isn't entirely true - ASCII characters will still work, but programs that use them are less efficient than those that use UNICODE).

    Also, if you plan to localize your programs (translate them to different languages), then UNICODE is essential.

    One of the easiest ways to deal with having both types of strings is to use TCHARs with the _T() or TEXT() macros.

    Comments on this post

    • JimmyGosling agrees
    Jon Sagara

    "Me fail English? That's unpossible!"
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    3
    Rep Power
    0
    Ok, all those macros, functions, data types, just confused me....

    like vsprintf(), and the like..

    and TCHAR (am I getting this right)

    I mean, I get it more or less, but it's really really fuzzy, and I couldn't use it on my own.


    Also, in the Programming windows fifth edition book by Petzold, he uses all those macros, and says he made all the examples as unicode as possible.

    Did he use the best "real world" method of doing it?

    thanks,
    -cARL
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    IMHO, yes. That's more or less how I program at work (excepting the fact that we use a proprietary string class).
    Jon Sagara

    "Me fail English? That's unpossible!"
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    3
    Rep Power
    0
    What does IMHO stand for? Is this some kind of obscure data type? or macro? (I'm joking around although I do wonder what IMHO stands for, I see it used everywhere on forums)

    Are my dumb questions getting annoying to you elite coders? (just wondering cauze I have a lot of them, don't expect them to stop coming either :) )

    -cARL
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    IMHO = In My Humble Opinion

    There are no dumb questions. :) You have to start somewhere, and I know this stuff can be daunting at first, so ask away!
    Jon Sagara

    "Me fail English? That's unpossible!"

IMN logo majestic logo threadwatch logo seochat tools logo