반응형
CString strFullText = _T("");
CString strTemp = _T("");
while (pcInternetFile->ReadString(strTemp))
{
strFullText += CA2W((LPCSTR)strTemp.GetBuffer(), CP_UTF8); // When reading files from CInternetFile .. Important
strTemp.ReleaseBuffer();
}
strFullText.Remove(_T('\t')); // tab del
strFullText.Remove(_T('\n')); // del
strFullText.Remove(_T('\r')); // del
file.Open(file name, CFile::modeCreate | CFile::modeWrite);
CT2CA OutputString(strFullText, CP_UTF8); // When writing in encoding CFile UTF 8 ... important
file.Write(OutputString, ::strlen(OutputString));
file.Close();
반응형
'C++' 카테고리의 다른 글
MFC Feature Pack - CMFCEditBrowseCtrl Get Path (0) | 2020.06.02 |
---|---|
"DTD cannot be used" when loading C++ xml DOM. Methods that can be used for error messages (0) | 2020.06.02 |
AfxGetMainWnd() (0) | 2020.05.28 |
MFC Class cross reference (0) | 2020.05.28 |
How to use the CInternetSession OpenURL (0) | 2020.05.22 |