From Xojo Documentation


Decodes the components of a URL that were encoded by EncodeURLComponent or equivalent.


result = DecodeURLComponent(str [,enc])

Part Type Description
result String The 'original' string.
str String The encoded URL.
enc TextEncoding The TextEncoding to be used to decode str.


A valid URL consists of alphanumerics, special characters and some reserved characters. Use DecodeURLComponent to convert encoded characters back to their original values.

The optional text encoding parameter is used to specify the original encoding of the string. To specify the encoding, use the Encodings module as shown in the second example.

Sample Code

Here are examples of how an encoded URL is decoded.

Dim s As String
s = DecodeURLComponent("") // returns "www.bob&"
s = DecodeURLComponent(TextField1.Text, Encodings.DOSArabic))

See Also

Encodings module, EncodeURLComponent function.