Daniel Pfeffer wrote:
Richard MacCutchan wrote:If you make everything Unicode, you should not have any issues.
It depends on what you mean by Unicode...
Windows API and UI use UTF-16 (started with Windows-NT 4.0) but if you generate output for a SMTP/email/WEB you must use UTF-8. For UTF-16 you can use CStringW or std::wstring but for UTF-8 CStringA or std::string. UTF-8 is a multibyte string format but it has nothing to do with the old MBCS which depend on codepages.
In this case using CSting depended on the UNICODE define to make the code UTF-16 aware is now out of time and can shoot you in the foot.
Conversions between UTF-16 and UTF-8 can be done with the current MultiByteToWideChar and WideCharToMultiByte. But if you write more general software, do it with the stl:
The bad thing is that the current C++ Visual Studio editor can't handle utf-8 string literals. It is a Windows application you know...