设置WinHttpRequest的URL编码

设置WinHttpRequest的URL编码

'代码页

Const CodePage_GB2312 = 936 ' 简体中文 (GB2312)

Const CodePage_BIG5 = 950  ' 繁体中文 (BIG5)


'设置WinHttpRequest的URL编码

Const WinHttpRequestOption_URLCodePage = 2

Dim WinHttpRequest

Set WinHttpRequest = CreateObject("WinHttp.WinHttpRequest.5.1")

WinHttpRequest.Option(WinHttpRequestOption_URLCodePage) = CodePage_GB2312


'设置ServerXMLHTTP的URL编码

Const SXH_OPTION_URL_CODEPAGE = 0

Dim ServerXMLHTTP

Set ServerXMLHTTP = CreateObject("Msxml2.ServerXMLHTTP")

ServerXMLHTTP.setOption SXH_OPTION_URL_CODEPAGE, CodePage_GB2312

你可能感兴趣的:(设置WinHttpRequest的URL编码)