Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

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, and ISO-8859-1. You may use any character set supported by your JRE. Optional. If the pageencoding attribute is used, the following guidelines apply:

  • The cfprocessingdirective tag can not be used within a conditional statement (cfif or cfcase) because it’s evaluated when ColdFusion compiles the page, not at runtime.

  • If there are multiple cfprocessingdirective tags within a page that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page