TCHAR sWrite[]="这里写一窜包含中文的字符.abcd123";
BYTE sUNICODE={0xff,0xfe};
CFile mFile(_T("user.txt "), CFile::modeWrite|CFile::modeCreate);
mFile.Write(sUNICODE,sizeof(sUNICODE)); //将文件变为UNICODE编码
mFile.Write(sWrite,sizeof(sWrite));
mFile.Flush();
mFile.Close();