我在我的项目中使用WebBrowser
控件。我的代码例子如下:浏览器编码问题
webBrowser1.Navigate("Web Site goes here");
Web浏览器导航谷歌网站,但我看不到土耳其的字符。
所以我用:
webBrowser1.Document.Encoding = "UTF-8"
但是问题仍然存在。任何想法解决这个问题?
我在我的项目中使用WebBrowser
控件。我的代码例子如下:浏览器编码问题
webBrowser1.Navigate("Web Site goes here");
Web浏览器导航谷歌网站,但我看不到土耳其的字符。
所以我用:
webBrowser1.Document.Encoding = "UTF-8"
但是问题仍然存在。任何想法解决这个问题?
StreamReader sr = new StreamReader(this.webBrowser1.DocumentStream, Encoding.GetEncoding("UTF-8"));
string source = sr.ReadToEnd();
或者你可以尝试编码“iso-8859-9”。 这应该这样做。
当您从其他外部浏览器导航到该网站时,该网站是否正常工作? –
检查页面meta标签中的charset是否一样 – Alleo
darin:是的,alleo:我做了检查,它也是utf-8 – julia