积极答复者
VC++2005中CHttpFile的问题

问题
-
这是我从别人这里拷的代码(VC6下成功通过),然后到了VC2005中编译通过后为什么结果不一样? CInternetSession mySession(NULL,0); CHttpFile* myHttpFile=NULL; CString myData; myHttpFile=(CHttpFile*)mySession.OpenURL(URL); while(myHttpFile->ReadString(myData)) //就是在这里,VC6中显示完全正常,然后到了VC2005中就变成了乱码。 { CString m_SiteInfo(""); m_SiteInfo=m_SiteInfo+L"\r\n"; m_SiteInfo+=myData; outfile<<m_SiteInfo; } myHttpFile->Close() ; mySession.Close() ; 求高人迅速解决!!谢谢!
答案
-
http://connect.microsoft.com/VisualStudio/feedback/details/101831/mfc-cinternetfile-readstring-cstring-reads-an-ansi-string-into-a-unicode-cstring
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 Helen Zhao 2012年1月30日 1:42
-
VC6默认是多字节编码的,VS2005默认使用的是Unicode编码
Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.- 已标记为答案 Helen Zhao 2012年1月30日 1:42
全部回复
-
http://connect.microsoft.com/VisualStudio/feedback/details/101831/mfc-cinternetfile-readstring-cstring-reads-an-ansi-string-into-a-unicode-cstring
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 Helen Zhao 2012年1月30日 1:42
-
VC6默认是多字节编码的,VS2005默认使用的是Unicode编码
Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.- 已标记为答案 Helen Zhao 2012年1月30日 1:42