Topic Path: Symbol Reference > Classes > TIdURI Class > TIdURI Methods > URLDecode Method
TIdURI.URLDecode Method

Converts a URL-Encoded string to a US-ASCII string.

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

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

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: 

RFC 1738 - Uniform Resource Locators (URL)  

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.

   AString := TIdURI.URLDecode(AURLString);
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.