Other changes

This section describes other changes between ColdFusion 5 and ColdFusion MX.

Character encoding

ColdFusion MX uses the UTF-8 character set encoding as its default 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.

Advanced Security

ColdFusion MX provides a new and easy way for you to build user authentication and roles-based security into your applications. However, it is based on a completely different security model than ColdFusion 5. Also, ColdFusion MX no longer includes a licensed version of Netegrity Siteminder. Therefore, any existing Advanced Security code-including the cfauthenticate and cfimpersonate tags, and the authenticatedContext(), authenticatedUser(), isAuthenticated(), isProtected(), and isAuthorized() functions-no longer works in ColdFusion MX. These tags and functions are obsolete in ColdFusion MX.

For more information about application security, see Developing ColdFusion MX Applications with CFML.

SNMP support

ColdFusion MX no longer supports Simple Network Management Protocol (SNMP) for monitoring ColdFusion applications from enterprise management systems.

Variables

Following are changes to variables in ColdFusion MX:

Operators

Following are changes in operands between ColdFusion 5 and ColdFusion MX:

CFML data types

ColdFusion MX preserves the case of a struct key, whereas ColdFusion 5 sets every struct key to uppercase. However, you cannot use different case to create more than one key. For example, the following code produces one key, not two:

x.Foo = 1;
x.FOO = 2;

For best results, use consistent case for struct key names.

COM objects

ColdFusion MX uses the Java Native Interface (JNI) to call COM objects, which results in slower performance than in ColdFusion 5. How much slower depends on the application and COM, but in the Macromedia tests of the same code, ColdFusion 5 completed in 50 milliseconds and ColdFusion MX completed in 2-3 seconds.

Template handlers

The Runtime service in Windows has been re-implemented in ColdFusion MX so that you can specify a template handler in the ColdFusion Administrator (Settings page). (A template handler is template to execute when the ColdFusion application server cannot find a requested template.) However, you must specify a template handler as a path that is relative to the web root directory, such as \missing.cfm for the file web_root\missing.cfm. Do not use a full path.

Case in forms

Unlike ColdFusion 5, ColdFusion MX preserves the case of field names submitted by forms, instead of forcing them to uppercase. Like ColdFusion 5, ColdFusion MX ignores case when evaluating field names (for example, #form.myfield# is the same as #FORM.MYFIELD#). However, you should change templates that use Find() or ListFind() to search through the Form.Fieldnames variable, to use case-insensitive equivalents.

Objects for date/time

ColdFusion MX no longer strips milliseconds off of date/time objects; to do this, use the date formatting functions.

Date pivot point for two-digit years

When ColdFusion processes a date that has does not include the century, ColdFusion determines the century. To do this, ColdFusion compares the date to when it processes the date. With a few exceptions, ColdFusion MX uses 20 as the date pivot point for calculating the century in a two-digit year. ColdFusion 5 uses 29.

Note:   The following locales use 28 as the date pivot point instead of 20: English(Australian), English(New Zealand), German(Austrian), German(Standard), German (Swiss), Portuguese(Brazilian), Portuguese(Standard), and Swedish. Macromedia has confirmed this inconsistency using the SUN JRE version 1.4 and the IBM JRE version 1.3.0.

So in ColdFusion MX, if the date is within 80 years before and 20 years after the date when it processes the date, then ColdFusion MX returns the date with the current century. Otherwise, it returns the previous century. In ColdFusion 5, if the date is within 71 years before and 29 years after the date when it processes the date, then ColdFusion 5 returns the current century. Otherwise, it returns the previous century. This can cause incompatible results. For example, LSParseDateTime("25-12-13 22:10:15") returns a year of 1925 in ColdFusion MX, and 2025 in ColdFusion 5.

Note:   Results might differ, depending on your Java Runtime Environment (JRE). This information reflects tests on the SUN JRE version 1.4 and the IBM JRE version 1.3.0. Macromedia has also tested using the SUN JRE version 1.3.1_01; however, many of these tests have failed on locales other than English(US).

For more information, see the Java documentation for the java.text.SimpleDateFormat class, at http://java.sun.com/j2se/1.3/docs/api/index.html.

Request variable

ColdFusion MX no longer supports the RequestTimeout attribute in the URL. For pages expecting the RequestTimeout attribute in the URL, add the following tag:

<cfsetting RequestTimeout = "#URL.RequestTimeout#">

For more information, see the "Variables and Reserved Words" chapter of CFML Reference.

Definition of pi

ColdFusion MX and ColdFusion 5 define pi with slightly different precision. Therefore, you might obtain slightly different results between the two for trigonometric functions such as sin, cos, and tan at the boundaries (0, 90, 180, 270, ... degrees).

Null values

ColdFusion 5 converted all null values to an empty string (" "). ColdFusion MX preserves null values, but converts them to an empty string when you use them as simple values.

thisTag scope

In ColdFusion 5, you can change system values in the thisTag scope that persist throughout the execution of the tag. This is fixed in ColdFusion MX; it throws an exception if you try to set thisTag.hasendtag or thisTag.executionmode.

Caching

In ColdFusion MX, in the Caching page of the ColdFusion Administrator, the Template Cache Size (Number of Templates) option displays the number of templates in the cache. In ColdFusion 5, it displays the size of the cached templates in kilobytes.

Log files

ColdFusion MX does not support the following ColdFusion 5 log files:

Comments