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 and up.  Not supported on Adobe ColdFusion, etc.

cfpageencoding 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


Fork me on GitHub