1、ReadFile
第一次存到TCHAR数组中,发现日文有乱码
第二次存到char数组中,再将char转tchar,没问题
2、
CString TCHAR TCHAR* char
#ifdef UNICODE
typedef wchar_t TCHAR; #else
typedef unsigned char TCHAR; #endif
typedef unsigned char CHAR;
typedef unsigned wchar_t WCHAR;
由此可以看出,CHAR实施上就是unsigned char,WCHAR为宽字符,而TCHAR根据是否支持unicode而不同。在程序使用sizeof(TCAHR),当默认设置时,这个值是1;当定义UNICODE宏时,这个值是2。
TCHAR,char是可以同整型互换的类型。
char*、TCHAR*转换CString CString str(****)
CString中特别有用的函数
int Find( TCHAR ch ) const;
int Find( LPCTSTR lpszSub ) const;
int Find( TCHAR ch, int nStart ) const;
int Find( LPCTSTR pstr, int nStart ) const;