webbrowser encoding problem

…衆ロ難τιáo~ 提交于 2019-12-06 09:04:36
StreamReader sr = new StreamReader(this.webBrowser1.DocumentStream, Encoding.GetEncoding("UTF-8"));
string source = sr.ReadToEnd();

or you can try "iso-8859-9" for encoding. this should do it.

This was really helpful.

I was stuck with this for a while and managed to get my code to work

using (FileStream fs = new FileStream(urlfile, FileMode.Create))
                        {

                            using (StreamWriter sw = new StreamWriter(fs, Encoding.UTF8))
                            {
                                sw.Write(datasetHtmlreplacements);
                                sw.Close();
                            }
                        }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!