cfpageencoding

The character encoding to use to read the content between the opening and closing tags.

  <cfpageencoding charset="utf-8"></cfpageencoding>

 cfpageencoding( charset="utf-8" ) {}

This tag requires Lucee.  Not supported on Adobe ColdFusion, etc.

Attribute Reference

charset string
Required

The name of the variable that will contain the value of the time taken.
Values:
  • utf-8
  • iso-8859-1
  • windows-1252
  • us-ascii
  • shift_jis
  • iso-2022-jp
  • euc-jp
  • euc-kr
  • big5
  • euc-cn
  • utf-16

Examples
Sample code using the cfpageencoding tag

<cfpageencoding charset="utf-8">
Some UTF-8 content
</cfpageencoding>

Expected Result: Encoding the buffered content between the tags

cfpageencoding( charset="utf-8" ){
writeoutput("Some UTF-8 content");
}

Expected Result: Encoding the buffered content between the tags

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub