ASP乱码的解决方法

2012 年 12 月 18 日5630

ASP乱码的解决方法

CND8学院 ASP教程 发布日期:2008年07月09日


: 在做内有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建立图表

一个用asp+存取数据库的例子

ASP进阶之文章在线管理更新(11)

在多行文本框中显示读取信息

浅析ASP内置组件

asp动态生成wbmp图片的程序

IIS6架设网站问题总结

一个xmlhttp读取xml的例子

在红蜻蜓中实现多房间

预编译 aspnet_compiler

点这里查看更多ASP教程

0 0