散分 serverxmlhttp编码乱目的解决方法,爽啊!!真爽啊,

原创 2005年06月01日 11:12:00

2005年的博客 不知道为何 当时候的csdn吧博文中的回车键都删除了。。。变成了无法阅读的状态

,,今天有空来改改

竟然10年了 。情况大概这样子 MSXML2.XMLHTTP 用这个组件会乱码 用 MSXML2.serverXMLHTTP 就不会乱码


<%

****************************************'*
类名: sxsrc.com
'* 功能: xml
'* 支持: forum.sxsrc.com
'* 新增: Jaken,花中笑
'* 日期: 2005-6-1 V1.0
'****************************************

response.charset="gb2312"

Dim webServiceUrl, httpReq

'str=covertion(sqlStr)
webServiceUrl ="http://localhost:81/index.asp"
Set httpReq = Server.CreateObject("MSXML2.serverXMLHTTP")
httpReq.Open "GET", webServiceUrl, False
httpReq.Send
response.binarywrite
httpReq.responsebody '
consumeWebService=httpReq.responseText
' set iStream = httpReq.responsestream.istream
' with iStream'
.type = 1
' .mode = 3
' .open
' .charset ="gb2312"
' .writetext
' end with'
'srSave=covertion(httpReq.responseText)


%>

Microsoft XML Core Services (MSXML) 4.
0 - XML Reference IServerXMLHTTPRequest/ServerXMLHTTP Members[Visual Basic, Script] The following tables show the properties, methods, and events.
[C/C++] The following tables show the properties, methods, and events.
This interface inherits from IXMLHTTPRequest.
Propertiesonreadystatechange Specifies the event handler to be invoked when the readyState property changes.
 Read/write.
 responseBody Represents the response entity body as an array of unsigned bytes.
 Read-only.
 readyState Represents the state of the request.
 Read-only.
 responseStream Represents the response entity body as an IStream.
 Read-only.
 responseText Represents the response entity body as a string.
 Read-only.
 responseXML Represents the response entity body as parsed by Microsoft® XML Core Services (MSXML).
 Read-only.
 status Represents the HTTP status code returned by a request.
 Read-only.
 statusText Represents the HTTP response line status.
 Read-only.
 MethodsNote The following method names are case-sensitive when used with ServerXMLHTTP.
 They are not case-sensitive when used with XMLHTTP.
abort Cancels the current HTTP request.
 getAllResponseHeaders Retrieves the values of all the HTTP headers.
 getOption Returns the value of one of the following options: SXH_OPTION_URL SXH_OPTION_URL_CODEPAGE SXH_OPTION_ESCAPE_PERCENT_IN_URL SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS SXH_OPTION_SELECT_CLIENT_SSL_CERT getResponseHeader Retrieves the value of an HTTP header from the response body.
 open Initializes a request and specifies the method, URL, and authentication information for the request.
 send Sends an HTTP request to the server and receives a response.
 setOption Sets one of the following options: SXH_OPTION_URL_CODEPAGE SXH_OPTION_ESCAPE_PERCENT_IN_URL SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS SXH_OPTION_SELECT_CLIENT_SSL_CERT setProxy Specify proxy configuration.
 setProxyCredentials Specify proxy authentication credentials.
 setTimeouts Specifies timeout settings for resolving the domain name, establishing the connection to the server, sending the data, and receiving the response.
 setRequestHeader Specifies the name of an HTTP header.
 waitForResponse Allows the requesting server to suspend execution while waiting for an asynchronous send operation to complete.
 EventsNone.

常用字符集编码原理及解决方法

  • 2013年06月19日 15:13
  • 267KB
  • 下载

oracle 错误编码大全及解决方法

  • 2012年01月06日 11:22
  • 10.26MB
  • 下载

JSONObject.fromObject(obj)顺序被打乱的异常解决方法

在一次做json字符串的转化的时候,我使用了JSONObject json = JSONObject.fromObject(obj);来把Object类型的obj转换为json字符串,但是在测试时却发...
  • GGdido
  • GGdido
  • 2016年09月06日 09:04
  • 2700

IDEA编码GBK不可映射字符解决方法

  • 2013年03月25日 15:40
  • 366KB
  • 下载

easyui 初始加载时页面样式乱的解决方法

easyui 初始加载时页面样式乱的解决方法
  • wyljz
  • wyljz
  • 2016年04月15日 17:45
  • 4300

Dom4j保存数据乱码以及xml文件头编码格式改变的原因和解决方法

dom4j解析xml文档请参考:java解析xml的方式总结 dom4j对xml文档进行增删改查后都要将数据写回原文件,有时会出现乱码。 产生乱码原因:         此时,不管xml文档的编码格...
  • zyh5540
  • zyh5540
  • 2013年07月24日 16:26
  • 1682
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:散分 serverxmlhttp编码乱目的解决方法,爽啊!!真爽啊,
举报原因:
原因补充:

(最多只允许输入30个字)