RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
HTTPApp.HTTPDecode Function

Decodes a string that includes HTTP escape characters.

Pascal
function HTTPDecode(const AStr: String): string;
C++
AnsiString HTTPDecode(const AnsiString AStr);

HTTPApp

HTTPDecode decodes the escape characters (+ and %) in a string that comes from an HTTP message header. Plus characters (+) are converted into spaces. Percent signs (%) indicate that the next two characters are the hex representation of a character. If a percent sign is followed by another percent sign (%%), it is converted into a single percent sign. 

For example, the string 

%%+%3f 

is converted into 

% ? 

The AStr parameter is the undecoded string. The return value is the converted version of the string. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!