[API]
MultiByteToWideChar

[CODE]
Public Function URLDecode(ByVal xURL As String) As String
  Dim xLong1 As Long
  Dim xLong2 As Long
  Dim xLong3 As Long
  Dim xChar1 As String
  
  xLong2 = Len(xURL)
  If Not xLong2 = 0& Then
    Do
      xLong1 = xLong1 + 1&
      xLong3 = Asc(Mid(xURL, xLong1, 1&))
      If xLong3 = 37& And xLong1 < xLong2 - 1& Then
        xLong3 = Val("&h" + Mid(xURL, xLong1 + 1&, 2&) + "&")
        If xLong3 = 0& Then
          xChar1 = xChar1 + Mid(xURL, xLong1, 1&)
          Else
          xChar1 = xChar1 + Chr(xLong3)
          xLong1 = xLong1 + 2&
          End If
        ElseIf xLong3 = 43& Then
        xChar1 = xChar1 + " "
        Else
        xChar1 = xChar1 + Mid(xURL, xLong1, 1&)
        End If
      Loop While xLong1 < xLong2
    xLong1 = Len(xChar1)
    If Not xLong1 = 0& Then
      xLong2 = MultiByteToWideChar(65001, 0&, ByVal xChar1, xLong1, ByVal 0&, 0&)
      xURL = String(xLong2, vbNullChar)
      xLong1 = MultiByteToWideChar(65001, 0&, ByVal xChar1, xLong1, ByVal StrPtr(xURL), xLong2)
      If xLong1 = xLong2 Then
        URLDecode = xURL
        End If
      End If
    End If
  End Function