August 2003
Intermediate to advanced
1140 pages
68h 45m
English
SetEncoding
SetEncoding("Form|Url", charset)Sets the character encoding for form or
URL variables to charset when
the submitted form or URL data is not in Latin-1 encoding.
charset lets you specify a Java character
set to use for the encoding. The most common character sets are
UTF-8 (the default), UTF-16,
UTF-16BE, UTF-16LE,
US-ASCII, and ISO-8859-1. You
may use any character set supported by your JRE. The following
example assumes the page is receiving a form post with form field
data that is not Latin-1 encoded. Is simply sets the encoding to
UTF-8 and dumps the form scope
to the browser:
<cfset SetEncoding("form", "UTF-8")>
<cfdump var="#form#">