其他语言

本类阅读TOP10

·基于Solaris 开发环境的整体构思
·使用AutoMake轻松生成Makefile
·BCB数据库图像保存技术
·GNU中的Makefile
·射频芯片nRF401天线设计的分析
·iframe 的自适应高度
·BCB之Socket通信
·软件企业如何实施CMM
·入门系列--OpenGL最简单的入门
·WIN95中日志钩子(JournalRecord Hook)的使用

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
lotus编码中文解码函数

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

Function fnDecode(inString As String) As String
 inString=Replace(inString,"+"," ")
 Dim L As String
 Dim M As String
 Dim R As String
 Dim P As Integer
 Dim TP As Integer
 Dim fnDecode1 As String
 Dim rstr As String
 If Instr(inString,"%")>0 Then
  TempStr=inString
  Do While Instr(TempStr,"%")>0
   P=Instr(TempStr,"%")
   L=Left(TempStr,P-1)
   M=Mid(TempStr,P+1,5)
   If Cint("&H"+Left(M,1))<10 Then
    M=Left(M,2)
    If M="0A" Or M="0D" Then
     If M="0D" Then
      rstr=rstr+L+"<br>"
     End If
    Else
     rstr=rstr+L+Chr(Clng("&H"+M)) 
    End If
    
    TP=(P+2)
   Else
    M=Left(M,2)+Right(M,2)
    rstr=rstr+L+Chr(Clng("&H"+M))
    TP=(P+5)
   End If
   R=Right(TempStr,Len(TempStr)-TP)
   TempStr=R
  Loop
  fnDecode=rstr+TempStr
 Else
  fnDecode = inString
 End If
End Function

本函数可以解析由Lotus产生的编码,特别是在Query_string_decoded域不起作用的时候,需要这个函数来解码.如使用中有问题可以到http://www.oaunion.com/bbs的lotus讨论中心中提出.

 




相关文章

相关软件