End Google Ads 201810 - BS.net 01 -->
Dear .
Here I have a HTML web page file,such as "MyWeb.html".
Now I read it into CString object,and use to Find some chinese characters.For example:
CString str="";
CStdioFile file;
CString strLine="";
if(!file.Open("MyWeb.html",CFile::modeRead | CFile::typeText,NULL))
{
CString strTemp;
strTemp.Format("Open file error:%d",GetLastError());
MessageBox(strTemp);
return;
}
while(file.ReadString(strLine)){
str = str + strLine;
}
MessageBox(str);
if(str.Find("some chinese characters.")>=1){
MessageBox("the characters is in the file.");
}
file.Close();
My operate system is Chinese Simplified,but this web page is utf-8.when use MessageBox to display all Cstring characters,the english characters display correctly ,but the chinese isn't,is all garbled.
Now what can I do ?
thanks !
Best Reguards !
مواقع النشر (المفضلة)