如何确定网络响应流的编码?

发布于 2024-08-27 01:34:54 字数 20 浏览 4 评论 0原文

如何确定网络响应流的编码?

How to determine the encoding of a webresponse stream ?

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

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

发布评论

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

评论(1

狂之美人 2024-09-03 01:34:54

我猜您对 HTML 内容感兴趣。事实上这并不是一件容易的事。大多数浏览器所做的就是使用编码、unicode 字节(在文档的开头)和 HTML 标头作为提示,同时尝试不同的字符集以查看是否存在 '

该算法的详细信息在 HTML5 规范的 8.2.2.1 中概述,请参阅:http://www.w3.org/html/wg/drafts/html/master/single-page.html

I presume you're interested in HTML content. Actually this is not really an easy task. What most browsers do is use the encoding, the unicode bytes (at the start of your document) and HTML headers as hints, while trying different charsets to see if there's a '

The details of the algorithm are outlined in 8.2.2.1 of the HTML5 specification, see: http://www.w3.org/html/wg/drafts/html/master/single-page.html .

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