询问者
能设置WebBrowser以指定编码格式访问网页吗?

问题
全部回复
-
您好,
請參考以下的方式試看看,
StreamReader sr = new StreamReader(this.webBrowser1.DocumentStream, Encoding.GetEncoding("UTF-8"));
string source = sr.ReadToEnd();- 已建议为答案 Leo (Apple) YangModerator 2014年8月14日 6:29
- 取消建议作为答案 sunnynet 2014年8月15日 1:56
-
你好,
参考下这个帖子:
http://stackoverflow.com/questions/3952653/wp7s-webbrowser-navigatetostring-and-text-encoding
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 Leo (Apple) YangModerator 2014年8月18日 2:26
- 取消答案标记 sunnynet 2014年8月25日 3:15
-
参考一下这个: http://blog.csdn.net/huangliangjie/article/details/7196464
目前没有直接可用的API可以设置网页编码,不过如果你网页显示是乱码的话还是可以通过手动为HTML中每个字符的编码设置的方式来显示正确。
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.