Name
cfprocessingdirective
Synopsis
<cfprocessingdirective>
CFML
[</cfprocessingdirective>]
Specifies
a compiler processing option to suppress all whitespace produced by
ColdFusion within the cfprocessingdirective tag
pairs. In ColdFusion MX, a new attribute called
pageencoding was added, allowing you to specify a
character encoding to use to read the page.
cfprocessingdirective tags must occur in matched
pairs (i.e., have an end tag) when used to suppress whitespace (this
is not necessary if you are only setting the page encoding) and may
also be nested. cfprocessingdirective settings
don’t apply to templates called via
cfimport, cfobject,
cfinvoke, cfinclude, or
cfmodule or as custom tags. Macromedia recommends
using either the suppresswhitespace attribute or
the pageencoding attribute within a single
cfprocessingdirective tag, but not both at the
same time.
Attribute
-
pageencoding="character_set" New in ColdFusion MX. Specifies a Java character set for ColdFusion to use when reading the contents of the page. The most common character sets are
UTF-8(the default),UTF-16,UTF-16BE,UTF-16LE,US-ASCII, andISO-8859-1. You may use any character set supported by your JRE. Optional. If thepageencodingattribute is used, the following guidelines apply:The
cfprocessingdirectivetag can not be used within a conditional statement (cfiforcfcase) because it’s evaluated when ColdFusion compiles the page, not at runtime.If there are multiple
cfprocessingdirectivetags within a page that ...