SetEncoding

"-->
 SetEncoding (scope_name,charset) 

Description

For when the locale is anything except English, this sets the character encoding of form scope variable values. Scope name can be either a URL or a form name.

Example

In this example an example form is set and we are assuming that Japanese Shift-JIS characters are being sent to the processing page.

 <form action="example.cfm" method="post">  Name: <input type="text" name="exampleName">  Address: <input type="text" name="exampleAddress">  City: Name: <input type="text" name="exampleCity">  </form>  <form name="exampleForm" action="example.cfm" method="post">  Name: <input type="text" name="exampleName">  Address: <input type="text" name="exampleAddress">  City: Name: <input type="text" name="exampleCity">  </form>  <cfscript>   setEncoding("exampleForm", "SHIFT-JIS");   newName = "#exampleForm.exampleName#";   newAddress = "#exampleForm.exampleAddress#";   newCity = "#exampleForm.exampleCity#";  </cfscript>  


Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net