以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML基础 』  (http://bbs.xml.org.cn/list.asp?boardid=1)
----  请问用xmlhttp调用繁体出现乱码怎么解决  (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=10087)


--  作者:cqhand
--  发布时间:9/17/2004 6:03:00 PM

--  请问用xmlhttp调用繁体出现乱码怎么解决
http://www.190bp.com/xml/threestar_all.xml
我想调用这个的数据怎么办呢??如何解决乱码。谢谢。。

--  作者:cqhand
--  发布时间:9/17/2004 7:01:00 PM

--  
ttttt
--  作者:cqhand
--  发布时间:9/17/2004 8:05:00 PM

--  
ttttttttttttttttt
--  作者:卷积内核
--  发布时间:9/18/2004 9:46:00 AM

--  
上面的网站我打不开啊,不知道里边是什么.一般你把它存为UTF-8编码格式就可以拉
--  作者:cqhand
--  发布时间:9/18/2004 3:46:00 PM

--  
<%
on error resume next
                
Const adTypeBinary = 1
Const adTypeText = 2
Function Bytes2bStr(vin)
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
With BytesStream
.Type = adTypeText
.Open
.WriteText vin

.Position = 0
.Charset = "utf-8"
'.Position = 2
StringReturn = .ReadText
.close
End With
Set BytesStream = Nothing

Bytes2bStr = StringReturn

End Function

url="http://www.190bp.com/xml/threestar_all.xml"
set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false)
oSend.send()

if err.number<>0 then
Response.write err.description
Response.End()
end if  

SourceCode = bytes2BSTR(oSend.responseBody)
response.write SourceCode
%>这样嘛。但是有错呢。能正常显示,缺少了点东西。。。再xml情况下的“-”不见了就不能正常显示了


--  作者:纯色理想
--  发布时间:9/22/2004 9:49:00 AM

--  
学习中
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
62.500ms