如何获取返回的utf-8编码正文
sUrl = @"http://my.37.com/user/userinfo.php";
xmlhttp = new WinHttpRequest();
xmlhttp.SetTimeouts(30000, 30000, 30000, 30000);
xmlhttp.Open("GET", sUrl, true);
xmlhttp.SetRequestHeader("Accept", "image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */*");
xmlhttp.SetRequestHeader("Accept-Language", "en-US");
如果用winhttp组件的话
StreamReader reader = new StreamReader(xmlhttp.ResponseStream, Encoding.GetEncoding("UTF-8"));
x = reader.ReadToEnd();
用上面的方法获取返回的网页源码,总是提示StreamReader 最匹配的重载方法具有一些无效参数
请问winhttp在c#里如何把ResponseStream或者ResponseBody 按UTF8格式转成string ???