HttpWebRequest: Receiving response with the right encoding

后端 未结 3 878
被撕碎了的回忆
被撕碎了的回忆 2021-01-07 01:26

I\'m currently downloading an HTML page, using the following code:

Try
    Dim req As System.Net.HttpWebRequest = DirectCast(WebRequest.Create(URL), HttpWebR         


        
3条回答
  •  被撕碎了的回忆
    2021-01-07 01:46

    I believe that the HttpWebResponse has a ContentEncoding property. Use it in the constructor of your StreamReader.

提交回复
热议问题