-
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..
-
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 :)
-
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.
-
Well.. but I've never seen anybody in tutorials & stuff using _T("Hello"); .. that's confusing.. why not just "Hello" ?? :(
-
Hey! By the way.. where can I get a resource editor (not vc++ ... preferably a plugin for dev-C++ 5b)
-
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.
-
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?
-
This is really a General Discussions thread. Therefore it has been moved there....
Kermi3
-
If I work with Unicode.. will it work in 9x ?
-
it depends on the application... probably.
-
-
-
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.
-
But why isn't ASCII working on NT/2k/XP ??
-
>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.