开发者

How to determine the encoding of a webresponse stream?

How to开发者_运维技巧 determine the encoding of a webresponse stream ?


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 .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜