The compiler doesn't matter. Once they allow L before 'c' and "String" they support UNICODE. My favorite tutorial is in Programming Windows by Charles Petzold. Just for fun I Googled "UNICODE _UNICODE Tutorial" and I found a decent tutorial.
http://www.flipcode.com/articles/article_advstrings01.shtmlA few comments
>#define _UNICODE
Generally you place -D_UNICODE on the compile line so it's there for all source files and easy to remove or make multiple compiles.
>#include <tchar.h> // Include Unicode support functions
These are the macros. The wide functions are defined elsewhere but #include <windows.h> typcially gets most of them.
>wchar_t mystring[] = _TEXT("flipcode");
Bad code! WCHAR is preferred to match existing Windows types. wchar_t is always wide and _TEXT() is wide only when -DUNICODE. Either of the following are acceptable.
WCHAR mystring[] = L"flipcode";
TCHAR mystring[] = _TEXT("flipcode");
My little UNICODE tutorial:
Compiler support:If the compiler accepts L before strings, such as L'C' or L"String", UNICODE is supported.
Library support: Libraries now provide wide versions of most common functions such as snwprintf, wcslen, and wmemcpy. Library standards are trying to push out the old unsafe functions so they are often prefixed with an _ depending on what state of flux your compiler is in. Search those include files.
TCHAR is a system of macros that allow your programs to compile as UNICODE (WCHAR) or Ansi (CHAR) as desired just by adding or removing /DUNICODE and /D_UNICODE to your compile lines. Unless your app is never going to be compiled in Ansi it is best to develop entirely in TCHAR. Each time you forget to use TCHAR, WCHAR, or the _T() macro the compiler will beat you with a stick and after enough beatings you'll get to where you do it right almost every time. You'll want to compile Ansi occasionally to ensure that you haven't inadvertantly used a TCHAR where a CHAR or WCHAR belongs and when debugging code that depends on exact pointer behavior. With a few dirty compiler tricks, well written TCHAR code can be made to simultaneously generate UNICODE and Ansi functions without code duplication.
Plan on using the cb and cch Hungarian prefixes. You will need them.
Many <tchar.h> files are incomplete. If you think there's a WCHAR or TCHAR version of a library function, there probably is. Search the header files and create your own defines when necessary.
#if defined(__MINGW32__) || defined(_MSC_VER) && !defined(__POCC__)
#ifdef _UNICODE
#define _tmemmove wmemmove
#else
#define _tmemmove memmove
#endif
#endif