[已解决] get请求回来的网页是gb2312编码,怎么转换成utf8编码
本帖最后由 qw5838132 于 2020-11-12 14:03 编辑如题,au3读取gb2312编码网页是乱码,需要转换成utf8编码,麻烦大神们帮帮忙
$charsets = "GB2312"
$ContentTypes = "application/x-www-form-urlencoded"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Option(4) = 13056
$oHTTP.Option(6) = True
$oHTTP.SetTimeouts(30000, 30000, 30000, 30000)
$oHTTP.Open( 'GET', 'https://res.mail.qq.com/zh_CN/wework_ip/latest.html', False)
$oHTTP.SetRequestHeader("Content-Type", $ContentTypes & '; charset=' & $charsets)
$oHTTP.Send()
$Respond = BinaryToString($oHTTP.ResponseBody, 4)
MsgBox(64,"ok",$Respond)
$Respond = BinaryToString($oHTTP.ResponseBody, 1)
页:
[1]