请问出现这种乱码怎么办?不是繁体,也不是日文

dreamsun 2004-11-29 09:19:37
鑳戒緷闈犻潚骞撮

用xmlhttp返回的字符是这样,怎么办?
...全文
103 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
lienzhu 2004-12-02
  • 打赏
  • 举报
回复
通过下面函数转换一下:

function codeChange(str)
finalstr = ""
for i = 1 to lenb(str)
icharcode = ascb(midb(str,i,1))
if icharcode < &H80 then
finalstr = finalstr & chr(icharcode)
else
inextcode = ascb(midb(str,i+1,1))
finalstr = finalstr & chr(clng(icharcode) * &H100 + cint(inextcode))
i = i + 1
end if
next
codeChange = finalstr
end function
dachangtui 2004-12-02
  • 打赏
  • 举报
回复
这不是乱码.
colee 2004-12-02
  • 打赏
  • 举报
回复
贴出代码,是返回xmlhttp.responseText,xmlhttp.responseXML还是。。。?

oXmlHttp.open("POST","......",false)
oXmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded") //
试试加上这句
xuanyuan 2004-12-02
  • 打赏
  • 举报
回复
贴原程序出来看哈撒..
你应该用的是UTF-8字符集.
firefoxh 2004-12-01
  • 打赏
  • 举报
回复
xmlhttp组件默认就是使用UTF8格式的,你看看是不是字符集的问题
dsclub 2004-11-30
  • 打赏
  • 举报
回复
XML数据格式使用的是utf-8
weiqingal 2004-11-30
  • 打赏
  • 举报
回复
up
softbunny 2004-11-29
  • 打赏
  • 举报
回复
Unicode吧?如果是开发环境中,把字符串转码为UTF-8就行了
dreamsun 2004-11-29
  • 打赏
  • 举报
回复
我已经用了adostream的哦?
mrshelly 2004-11-29
  • 打赏
  • 举报
回复
BinaryWrite 就可以了

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧