MACROMEDIA COLDFUSION MX 61-CFML Reference page 411

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Chr
Converts a numeric value to a UCS-2 character.
Returns
A character with the specified UCS-2 character code.
Category
String functions
Function syntax
Chr(number)
See also
Asc
History
ColdFusion MX: Changed Unicode support: ColdFusion supports the Java UCS-2
representation of Unicode characters, up to a value of 65535. (Earlier releases supported 1-255.)
Parameters
Parameter
number
Usage
The values 0 – 31 are standard, nonprintable codes. For example:
returns a linefeed character
Chr(10)
returns a carriage return character
Chr(13)
The two-character string
Note: For a complete list of the Unicode characters and their codes, see www.unicode.org/charts/.
Example
<!--- If the character string is not empty, then
output its Chr value --->
<cfif IsDefined("form.charVals")>
<cfoutput>#form.charVals# = #Chr(form.charVals)#</cfoutput>
</cfif>
<cfform action="#CGI.script_name#" method="POST">
<p>Type an integer character code from 1 to 65535<br>
to see its corresponding character.<br>
<cfinput type="Text"
name="CharVals"
range="1,65535"
message="Please enter an integer from 1 to 65535"
validate="integer"
required="Yes"
size="5"
maxlength="5"
>
<p><input type="Submit" name=""> <input type="RESET">
</cfform>
Description
A value (a number in the range 0 to 65535, inclusive)
Chr(13) & Chr(10)
returns a Windows newline
Chr
411

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents