Lucee Tag Reference

<cfpageencoding>

Specifies the character encoding used for the current template file. This tag is processed at compile time and must be placed at the root level of your template. It serves the same purpose as the pageEncoding attribute of cfprocessingdirective but in a dedicated tag format.

Body

This tag may have a body.

Example

<cfpageencoding
	charset=string>
[</cfpageencoding>]
This tag is also supported within cfscript
<cfscript>
	pageencoding string expression {
			[...]
	}
</cfscript>

Attributes

The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name Type Required Description
charset string Yes Specifies the character encoding for the current template file. This must be a string literal corresponding to a valid character encoding (not a dynamic expression). Common encodings include UTF-8 (recommended for most applications), ISO-8859-1 (Latin-1), and Windows-1252 (Windows Western European). Example: charset="UTF-8"