Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

user settings for localization settings in header are overridden?

1 view
Skip to first unread message

Joop

unread,
Mar 30, 2007, 6:40:41 PM3/30/07
to
It looks like Cold Fusion sets the 'charset' and language in the page
header based on some auto-detection of the content instead of using
the user-supplied settings. UTF-8 is supposed to be the default, but
it gets changed anyway. For instance we use the following settings to
force UTF-8 and English as the language:

<cfcontent type="text/html; charset=utf-8">
<cfprocessingdirective pageEncoding="utf-8"/>
<cfheader name="Content-Type" value="text/html;charset=utf-8"
charset="utf-8" />

<cfscript>
SetLocale("en");
SetEncoding("form", "utf-8");
SetEncoding("url", "utf-8");
</cfscript>


We use a page without meta tags to rule out confusion. The analysis of
the page header shows the following settings:

Receiving Header:
HTTP/1.1·200·OK(CR)(LF)
Connection:·close(CR)(LF)
Date:·Fri,·30·Mar·2007·18:22:54·GMT(CR)(LF)
Server:·Microsoft-IIS/6.0(CR)(LF)
Set-Cookie:·CFID=5109;expires=Sun,·22-Mar-2037·18:22:54·GMT;path=/(CR)
(LF)
Set-Cookie:·CFTOKEN=3d74eeca785c8211-A415F549-
CDB5-483E-0653C03A73846E2A;expires=Sun,·22-Mar-2037·18:22:54·GMT;path=/
(CR)(LF)
Set-Cookie:·JSESSIONID=40303cbf117f2960212d;path=/(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Language:·ja-JP(CR)(LF)
Content-Type:·text/html;·charset=shift_jis(CR)(LF)
(CR)(LF)

We tried it with other languages too and it changes the settings based
on the language. So some auto-detection mechanism must be in place. We
have seen this with CF MX6.1 and MX7

Is there any way to make it use the user-supplied settings?
Regards.

Joop Kaashoek

Joop

unread,
Apr 2, 2007, 1:24:27 PM4/2/07
to
More research revealed that this problem is caused by the use of JSTL
tags . When the following tag is used:

<fmt:setLocale value="ja_JP" scope="session"/>

it messes with the following content headers:

Content-Language:
Content-Type:·

Trying to force it back to the proper settings afterwards does not
appear to work.
Is there a work-around to make JSTL work properly with Coldfusion?


Joop

unread,
Apr 2, 2007, 1:50:41 PM4/2/07
to
This is apparently a known problem with JSTL. Multiple calls to
certain <fmt: tags will add another 'Content-Language' tag to the
header, which could even caused an overflow. Sample posting:

http://forums.oracle.com/forums/thread.jspa?threadID=363704

Looking for a work-around..


0 new messages