Internet Direct (Indy)
Home
PreviousUpNext
TIdURI.URLDecode Method

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

Pascal
class function URLDecode(
    ASrc: string
): string;
Parameters 
Description 
ASrc 
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);
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.