您的位置:首页 > 其它

Unicode 和 ANSI读写文件

2008-01-12 16:07 204 查看
// std::string strAnsi;
//#ifndef UNICODE
// strAnsi = strContent;
//#else
// USES_CONVERSION;
// strAnsi = W2A(strContent.LockBuffer());
// strContent.UnlockBuffer();
//#endif
const BYTE head[2] = {0xff,0xfe};
txtFile.Open(szFileName,CFile::modeWrite|CFile::modeCreate);
txtFile.Write(head,2 * sizeof(BYTE));
txtFile.Write(strContent,strContent.GetLength() *2);
txtFile.Close();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: