浏览器编码问题

发布于 2024-12-02 09:17:15 字数 273 浏览 3 评论 0原文

我在我的项目中使用 WebBrowser 控件。我的代码示例如下:

webBrowser1.Navigate("Web Site goes here");

网络浏览器正在浏览 Google 网站,但我看不到土耳其字符。

因此我使用:

webBrowser1.Document.Encoding = "UTF-8"

但是问题仍然存在。有办法解决这个问题吗?

I am using a WebBrowser control in my project. My code example is below:

webBrowser1.Navigate("Web Site goes here");

The web browser is navigating the Google website, however I can not see the Turkish characters.

Therefore I use:

webBrowser1.Document.Encoding = "UTF-8"

However the problem still continues. Any idea to solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别把无礼当个性 2024-12-09 09:17:15
StreamReader sr = new StreamReader(this.webBrowser1.DocumentStream, Encoding.GetEncoding("UTF-8"));
string source = sr.ReadToEnd();

或者您可以尝试“iso-8859-9”进行编码。
这应该可以做到。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文