您的位置:首页 >> Web开发 >> ASP技术 >> ASP技巧 >> 正文
RSS
 

ASP乱码的解决方法 

http://www.rdxx.com 01年04月29日 00:00 不详 我要投稿

关键词: 乱码 , 解决方法 , ASP , 方法 , 解决
: 在做内有VBscript的asp homepage时,一个form提交方法为GET,
: 当form的表单传给asp处理时,入...asp?name="张三"
: 可张三的中文已经乱码,请问如何在asp中用vbscript将乱码恢复成
: 正确的中文.
: .......


对文字进行如下cut()过程即可
<script language=vbscript runat=server>
Function cut(str)
length = Len(str)
count = 1
Do While count <= length
If strComp(Mid(str,count,1),"Z",1) > 0 Then
length = length -1
End If
count = count + 1
Loop
cut = Left(str,Length)
if Session("Version")<>3 then '若为高版本asp则不需处理
cut = str
end if
End Function
</script>




 
 
标签: 乱码 , 解决方法 , ASP , 方法 , 解决 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站