Thread: What is _T("")?

  1. #1
    Unregistered
    Guest

    Question What is _T("")?

    What is _T("")?

    Thanks

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    According to a quick search via MSDN,

    _T is a macro to expand the string literal to support Unicode.

    Mark Oliver, MSMFC, 8/1/95
    [edit]Just did a little bit more research, apparently it is equivalent to the _TEXT macro.[/edit]
    Last edited by hk_mp5kpdw; 07-17-2002 at 01:00 PM.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Unregistered
    Guest
    Thanks; is _TEXT only used with UNICODE? Otherwise, isn't it the same as " "?

  4. #4
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    No. The effect of TEXT("") _TEXT("") _T("") all depend of if Unicode is defined in your source. The use of these macros allow you to compile a unicode/non-unicode version of your source. This is useful because Windows9x don't support unicode, while Win2K and NT are nativly unicode. You also have to remember to use the generic string manipulation functions instead of the str*(); type. I suggest reading the chapter on unicode in Charles Petzolds book, you can download it off of my FTP if you like.

  5. #5
    Unregistered
    Guest
    Thanks

  6. #6
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    whats unicode, i see a lot of talk about it. but im not to sure.i think it involves some unix stuff or something
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  7. #7
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Unicode is a character set. ASCII is also a character set. Just to keep things very simple, Unicode is a bigger character set. A Unicode character is 16bits opposed to the 8bits an ASCII character takes up. Windows runs in unicode natively so it is recommended to use unicode as much as possible. I don't but then again who is perfect?

  8. #8
    Christian
    Join Date
    Mar 2002
    Posts
    612
    Just to explain master5001 more, the ASCII character set only contains western language characters, such as english, spanish, french. It does not include langages from the east such as chineis, japanes, korean, ect.

    Unicode has both Eastern and Western character sets.
    I shall call egypt the harmless dragon

    -Isaiah 30.7

  9. #9
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    like if you go to Start->Programs->Accecories->...->Character Map
    and you look under fonts that support korean or japanese characters, and you try to copy and paste them into a post in the cboard, they will appear as question marks because the cboard, or any website(i might be wrong) doesn't support unicode.
    for example, this is the greek symbol sigma:
    ?(i copied and pasted it from the character map)
    hope this helps

Popular pages Recent additions subscribe to a feed