<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>URLDECODE</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">URLDECODE</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Decodes a URL-encoded string. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
A copy of a string, decoded.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Conversion functions, Other functions, String functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>URLDecode(<i>urlEncodedString[, charset]</i>)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
URLEncodedFormat; "Tags and functions for globalizing" in Chapter&#160;17, "Developing Globalized Applications," in ColdFusion MX Developer's Guide
</p>

<p>
ColdFusion MX&#160;6.1: Changed the default charset: the default charset is the character encoding of the URL scope.
</p>

<p>
ColdFusion&#160;MX: 
</p>
<ul>

<li>Changed Unicode support: ColdFusion supports the Java UCS-2 representation of Unicode character values 0-65535. (Earlier releases supported ASCII values.) </li>

<li>Added the charset parameter.</li>
</ul>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
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. 
</p>

<p>
Query strings in HTTP are always URL-encoded. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span>
<p>
This example creates, encodes, and decodes a string that contains ASCII character codes:
</p>
<pre>&lt;cfscript&gt;
   // Build string
   s = &quot;&quot;;
   for (c = 1; c lte 256; c = c + 1)
   {
      s = s &amp; chr(c);
   }
   // Encode string and display result
   enc = URLEncodedFormat(s);
   WriteOutput(&quot;Encoded string is: &#39;#enc#&#39;.&lt;br&gt;&quot;);
   // Decode and compare result with original
   dec = URLDecode(enc);
   if (dec neq s)
   {
      WriteOutput(&quot;Decoded is not the same as encoded.&quot;);
   }
   else
   {
      WriteOutput(&quot;All&#39;s quiet on the Western front.&quot;);
   }
&lt;/cfscript&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="URLENCODEDSTRING">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">URLENCODEDSTRING</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>URL-encoded string or a variable that contains one.</p>

  </td>
  </tr>
  </table>
</div>
<div id="CHARSET">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">CHARSET</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>The character encoding in which the URL is encoded. Optional.</p>
<p>The following list includes commonly used values:</p><ul>

<li>utf-8</li>

<li>iso-8859-1 </li>

<li>windows-1252</li>

<li>us-ascii</li>

<li>shift_jis</li>

<li>iso-2022-jp </li>

<li>euc-jp</li>

<li>euc-kr</li>

<li>big5</li>

<li>euc-cn</li>

<li>utf-16</li>
</ul>

<p>For more information on character encoding, see:www.w3.org/International/O-charset.html.</a> </p>
<p>The default value is the character encoding of the URL scope. See SetEncoding.</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
