I see that Visual Studio 2008 and later now start off a new solution with the Character Set set to Unicode. My old C++ code deals with only English ASCII text and is full of:
I recommend very much against L""
, _T()
, std::wstring
(the latter is not multiplatform) and Microsoft recommendations on how to do Unicode.
There's a lot of confusion on this subject. Some people still think Unicode == 2 byte characters == UTF-16. Neither equality is correct.
In fact, it's possible, and even better to stay with char* and the plain std::string
, plain literals and change very little (and still fully support Unicode!).
See my answer here: https://stackoverflow.com/questions/1049947/should-utf-16-be-considered-harmful/1855375#1855375 for how to do it the easiest (in my opinion) way.