<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>GETENCODING</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">GETENCODING</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>
Returns the encoding (character set) of the Form or URL scope. 
</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>
String; the character encoding of the specified scope.
</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>
International functions, System 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>GetEncoding(<i>scope_name</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>
SetEncoding, cfcontent, cfprocessingdirective, URLDecode, URLEncodedFormat
</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">History</span>
<p>
ColdFusion&#160;MX: Added this function.
</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">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>
Use this function to determine the character encoding of the URL query string or the fields of a form that was submitted to the current page. The default encoding, if none has been explicitly set, is UTF-8.
</p>

<p>
For more information, see www.iana.org/assignments/character-sets</a>.
</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><pre>&lt;!--- This example sends the contents of two fields and interprets them as
      big5 encoded text. ---&gt;
&lt;cfcontent type=&quot;text/html; charset=big5&quot;&gt;
&lt;form action=&#39;#cgi.script_name#&#39; method=&#39;get&#39;&gt;
&lt;input name=&#39;xxx&#39; type=&#39;text&#39;&gt;
&lt;input name=&#39;yyy&#39; type=&#39;text&#39;&gt;
&lt;input type=&quot;Submit&quot; value=&quot;Submit&quot;&gt;
&lt;/form&gt;

&lt;cfif IsDefined(&quot;URL.xxx&quot;)&gt;
&lt;cfscript&gt;
   SetEncoding(&quot;url&quot;, &quot;big5&quot;); 
   WriteOutput(&quot;URL.XXX is &quot; &amp; URL.xxx &amp; &quot;&lt;br&gt;&quot;); 
   WriteOutput(&quot;URL.YYY is &quot; &amp; URL.yyy &amp; &quot;&lt;br&gt;&quot;);
    theEncoding = GetEncoding(&quot;URL&quot;);
    WriteOutput(&quot;The URL variables were decoded using &#39;&quot; &amp; theEncoding &amp; &quot;&#39; 
encoding.&quot;); 

    WriteOutput(&quot;The encoding is &quot; &amp; theEncoding); 
&lt;/cfscript&gt;
&lt;/cfif&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="SCOPE_NAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">SCOPE_NAME</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>

<ul>

<li>Form </li>

<li>URL.</li>
</ul>


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

  </body>
</html>
