你用Strconv函数
StrConv(String1,VbUnicode)

StrConv(String1,VbFromUnicode)
前者是将Asi转Unicode或者恰好相反

解决方案 »

  1.   

    不行啊。
    我需要的这样:
    原字符串:“Request;545,%李白”
    转换后  :“Request%3B545%2C%25%C0%EE%B0%D7”
      

  2.   

    代码如下:
    Public Function URLEncode(ByVal strParameter As String) As String
    Dim s As String
    Dim I As Integer
    Dim intValue As IntegerDim TmpData() As Byte    s = ""
        TmpData = StrConv(strParameter, vbFromUnicode)
        For I = 0 To UBound(TmpData)
            intValue = TmpData(I)
            If (intValue >= 48 And intValue <= 57) Or _
                (intValue >= 65 And intValue <= 90) Or _
                (intValue >= 97 And intValue <= 122) Then
                s = s & Chr(intValue)
            ElseIf intValue = 32 Then
                s = s & "+"
            Else
                s = s & "%" & Hex(intValue)
            End If
        Next I
        URLEncode = sEnd Function