d00_ape Posted August 30, 2004 Share Posted August 30, 2004 I?d like to Decode a UTF-8 string to a regular CString. I?m using MFC and don?t really know where to start. I'm reading a UTF-8 coded file using CStdioFile and CFile. Has the _T(???) something to do with it? Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted August 30, 2004 Share Posted August 30, 2004 _T is a macro to help you in not having to rewrite your string code for MBCS, Unicode, or SBCS. It becomes a compiler switch to enable support for different character sets. So, all your literals should be wrapped in _T(). Depending upon which version of MFC you link against, CString will map to a wchar_t, otherwise, it maps to char. That said, it shouldn't matter what your data file is. MFC **should** handle it. Essentially, data becomes portable. Link to comment Share on other sites More sharing options...
0 bithub Posted August 30, 2004 Share Posted August 30, 2004 CString has a constructer which takes a wide character string. Link to comment Share on other sites More sharing options...
Question
d00_ape
I?d like to Decode a UTF-8 string to a regular CString. I?m using MFC and don?t really know where to start.
I'm reading a UTF-8 coded file using CStdioFile and CFile.
Has the _T(???) something to do with it?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts