
12
Chapter 1: Migrating Applications from ColdFusion 5
Localization and character handling
This section describes the changes between ColdFusion 5 and ColdFusion MX that affect locale
functions. It contains the following topics:
•
Extended character code and encoding support
•
Support for new currency formats
•
Changes to formatting functions
•
Other locale-specific changes
Note:
Results from localization functions might differ, depending on your Java Runtime Environment
(JRE).
Extended character code and encoding support
ColdFusion MX uses Java Unicode as its internal character representation and supports character
code values 0–65535, whereas ColdFusion 5 supports 1-255. This affects string-processing
functions. For more information, see
Len
in
“New functions, parameters, values, and changes”
on page 51
.
ColdFusion MX uses the UTF-8 character set encoding as its default web page encoding.
ColdFusion 5 used the ISO-8859-1 character set encoding. This can affect the way that
characters in the range 128–255 are displayed in the browser. To restore the ColdFusion 5 default
encoding, place the following
cfcontent
tag in your page (or in the application’s Application.cfm
page):
<cfcontent type="text/html; charset=ISO-8859-1">
Note:
UTF-8 (USC Transformation Format, where USC is the Universal Character Set) enables
computers to handle both ASCII and Unicode. Unicode (Unicode Worldwide Character Standard) is
a system of setting up binary codes for text or script characters, so that the characters from the
principal written languages of the world can be displayed and processed.
ColdFusion MX and ColdFusion MX 6.1 have added several attributes, parameters, and
functions for determining the character encoding used in tags and functions, as follows:
Additionally, an option has been added to the Mail page of ColdFusion MX Administrator that
specifies the default mail character encoding.
Tag or function
Attribute or parameter
cfhttp
charset
cfmail
charset
cfprocessingdirective
pageEncoding
GetEncoding
all
SetEncoding
all
URLDecode
charset
URLEncodedFormat
charset