Decodes a string that includes HTTP escape characters.
function HTTPDecode(const AStr: String): string;
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!
|