xmlhttp post 编码

来源:互联网 发布:分布式一致性算法 编辑:程序博客网 时间:2024/05/20 02:55

post时编码对应

 

1.发送接收都为gb2312       

 

两端其本不需要设置

 

2.两方都有urf-8编码

 

两方都设置

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.charset = "utf-8"%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

 

并且

 


dim objXmlHttp
set objXmlHttp =Server.CreateObject("MSXML2.ServerXMLHTTP")
objXmlHttp.setTimeouts 65000,65000,65000,65000

objXmlHttp.open "POST",strUrl,false
objXmlHttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded;charset=utf-8"

objXmlHttp.send str1

set objXmlHttp=nothing

 

 

原创粉丝点击