characters are invented to accommodate additional
international characters apart from English. Earlier
characters were represented in ASCII formats with each
character occupying 1 byte of memory. But with Unicode,
each character is represented with 2 bytes.
There is one more type of character set using 2 bytes
i.e.MBCS (Multi Byte
Character Set) or DBCS
(Double Byte Character Set). In fact any article about MFC
will have a reference to the MBCS and DBCS.
This character set is used for single
locale specific programming i.e., it can support
only one locale set in an application. But using Unicode
will enable the programs to use multiple locale
character sets simultaneously.
As the benefits of Unicode
immense as described above, it is imperative for any
application to give support to Unicode. MFC
supports Unicode in a very flexible way by
providing a single line macro to convert between a Unicode
and non-Unicode application.
will make the application Unicode enabled. But a
mere use of the macro will not be enough to make an
application Unicode enabled. Some of the
important things the application should take care of are
entry point of the application should be set as
should be declared and used as TCHAR type.
Length of the string should be passed as Length *
string functions declared in TCHAR.H viz., _tcscat,
__tcscpy, _tcscmp etc.,
Using the TCHAR programming set will
enable the compiler to choose between Unicode C
Runtime library and non-Unicode library. If the
program is defined to be a UNICODE program,
it will expand the TCHAR routines to ASCII
functions. If the program does not have any UNICODE
macro defined, it will be built as an ASCII application.
Unicode - Points to be Noted:
Unicode makes Windows NT/2000 efficient as Unicode
is the standard character set used in processing
characters. Any non-Unicode literals will be
converted back and forth for manipulations.
98 platforms do not support Unicode.