View Poll Results: What do you prefer?

Voters
11. You may not vote on this poll
  • Unicode

    4 36.36%
  • ASCII

    7 63.64%

Unicode/ASCII

This is a discussion on Unicode/ASCII within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I've just read a part of this tutorial: http://sunlightd.virtualave.net/Windows/GUI/Intro.html but I can't understand what is that _T for.. Is it ...

  1. #1
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542

    Unicode/ASCII

    I've just read a part of this tutorial: http://sunlightd.virtualave.net/Windows/GUI/Intro.html but I can't understand what is that _T for.. Is it necessary NOW?
    It says it's Unicode.. is it true that it's better than ASCII? Most of the programs use ASCII now..
    what does signature stand for?

  2. #2
    btq
    btq is offline
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    Posts
    161
    unicode is for multilingual purposes, ie, every character has it's own value and it's supposed to be the new standard..

    _T() just formats hte ASCII string into a unicode string...
    ie, _T("hello") is a unicode string that reads "hello"...

    hope this is an answer?
    /btq

  3. #3
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    The results of a poll will surely depend on who you ask:

    Ask 100 ignorant English speakers, like me, and we'll all vote for ASCII. (Why can't the whole world just use English!

    Ask 100 chinese programmers and I'm sure the answer would be different.
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

  4. #4
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Well.. but I've never seen anybody in tutorials & stuff using _T("Hello"); .. that's confusing.. why not just "Hello" ??
    what does signature stand for?

  5. #5
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Hey! By the way.. where can I get a resource editor (not vc++ ... preferably a plugin for dev-C++ 5b)
    what does signature stand for?

  6. #6
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    If you write programs for windows you should be aware of unicode.
    Windows 95,98 and me all run on ascii
    windows 2000 family runs on unicode.

    The _T macro will compile your strings as ascii if _UNICODE is not defined. If it is then _T macro will compile your strings as unicode.
    Petzold in his book Programming windows devotes a whole chapter to this as he feels it is so important. You will get a far better explanation of this by reading that chapter than i can give you here.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  7. #7
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Whether you use it or not... the Windows NT platforms (NT/2K/XP) convert your ASCII strings into unicode strings for internal use anyway. This will give you a performance hit, so why not just start with Unicode in the first place?

  8. #8
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    This is really a General Discussions thread. Therefore it has been moved there....

    Kermi3
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  9. #9
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    If I work with Unicode.. will it work in 9x ?
    what does signature stand for?

  10. #10
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    it depends on the application... probably.

  11. #11
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Application??

  12. #12
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    program
    executable
    ...

  13. #13
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    In short
    NO!
    That's why you use generic functions like _tcslen(), TEXT("hello") and generic types like TCHAR which will compile to either Unicode or ASCII depending on whether UNICODE is #defined. Windows9x does not support Unicode. Windows NT/2K/XP supports both to some extent, and Windows CE only supports Unicode.

  14. #14
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    But why isn't ASCII working on NT/2k/XP ??
    what does signature stand for?

  15. #15
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    >But why isn't ASCII working on NT/2k/XP ??

    it does work , thats what i currently program in and i'm on xp.


    So, is that why, in .NET, it has a _T main or whatever instead of a blank project? to encourage unicode? I am a newbie so i could go either way, i think it might just be more confusing not to go with ASCII.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert UNICODE/ASCII problem
    By todd14 in forum C++ Programming
    Replies: 2
    Last Post: 01-24-2008, 03:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21