Internet Direct (Indy) Version 9.0.2 Beta
TIdURI.URLDecode
Converts a URL-Encoded string to a US-ASCII string.

class function URLDecode(ASrc: string): string;
Parameters
ASrc: string
URL-encoded string to be decoded.

Returns
String - The un-encoded ASCII representation of the URL.

Description
URLDecode is a String class function that converts the URL-encoded string in ASrc to its representation in the US-ASCII character set. URLDecode is based on the URL character encoding rules as described in the Internet Standards document Uniform Resource Locators (URL), RFC 1738 .

URLDecode can used to reverse any string encoding performed using URLEncode.

URLDecode converts all occurrances of the '+' character to ' ' (Space) (Decimal 32). URLDecode reads any values represented as a hexadecimal character triplet consisting of the "%" character followed by the two-digit hexadecimal value for the octet, and returns the value to its US-ASCII representation.