string is an alias for String
String: UTF16
UTF16
wchar_t: UTF16 on Windows, UTF32 on Unix
wchar_t is not portable, better to use ICU instead.
typedef basic_string < char > string;
typedef basic_string < wchar_t > wstring;
wstring string1 = L"obecnÄ›";
UnicodeString: UTF16 internally. Note that the endianess of UTF-16 is platform dependent.
ICU does not use UCS-2. UCS-2 is a subset of UTF-16. UCS-2 does not support surrogates, and UTF-16 does support surrogates.
#ifdef UNICODE
typedef wchar_t TCHAR;
#else
typedef char TCHAR;
#endif
TCHAR * toto = _T("obecnÄ›");
No comments:
Post a Comment