Decodes a URL-encoded string.
A copy of a string, decoded.
Conversion functions, Other functions, String functions
URLDecode(urlEncodedString[, charset])
URLEncodedFormat; Tags and functions for globalizing applications in the Developing ColdFusion Applications
ColdFusion MX 6.1: Changed the default charset: the default charset is the character encoding of the URL scope.
ColdFusion MX:
Parameter |
Description |
|---|---|
urlEncodedString |
URL-encoded string or a variable that contains one. |
charset |
The character encoding in which the URL is encoded. Optional.The following list includes commonly used values:
|
URL encoding formats some characters with a percent sign and the two-character hexadecimal representation of the character. For example, a character whose code is 129 is encoded as %81. A space is encoded with a plus sign. Query strings in HTTP are always URL-encoded.
<cfscript>
bookName ="Hound of Baskervilles";
myURL='http://site.com?book=#EncodeForURL(bookName)#';
WriteOutput(myURL); // http://site.com?book=Hound+of+Baskervilles
writeOutput(urlDecode(myURL)) // http://site.com?book=Hound of Baskervilles
</cfscript>
Sign in to your account