我使用 CStdioFile 读取文本文件并且输出是字符串,但是当我在对话框中选择文件时我想检查原始编码文件如何检查原始编码?
//这是我的代码
if(dlg.DoModal() == IDOK)
{
path = dlg.GetPathName(); //get file path
CStdioFile pStdioFile1(path, CFile::modeRead);
char buff[BUFSIZ];
while(!feof(pStdioFile1.m_pStream))
{
pStdioFile1.ReadString(Buff); //Buff is read text to string
msg += Buff;
if(!feof(pStdioFile1.m_pStream))
{
msg += "\n";
}
}