Patric Stumpe wrote:
> Hmm, then I'll have to dig a bit into this on the live server.

look at the JVM arguments.

> A quick test shows that its default encoding is UTF-8.

you're setting the *file encoding* to utf-8?

> Dropping in a simple
>    <cfset foo = DateFormat(now(), 'dd.mm.yyyy') />
> anywhere on that page renders it instantly wrong!

is there a public example of this?

> Uhm, is it really? Something new to me after years :)

now() produces a very fine datetime object.

> PH> which is kind of overkill, why not use day/month/year functions instead? 
> the 0
> PH> padding?
> 
> Yep it is. But the 'designer' insists on those fields being two

its the format for your locale (ex.'06.02.06').

> digits. And a wrapper-function around the day/month/year values would
> be the same overkill as DateFormat. So this is again one of those

no, not really. if you have to stick to the locale format then you need to 
provide the padded date part output but using single function to do this at 
least gets around the DateFormat issue you're seeing.

to further narrow this & maybe another workaround does this:

<cfscript>
request.dDatum1=now();
thisLocale=createObject("java","java.util.Locale").init("de","DE");
jDateFormat=createObject("java","java.text.SimpleDateFormat");
request.sDatum1Tag=jDateFormat.init("dd",thisLocale).format(request.dDatum1);
request.sDatum1Monat=jDateFormat.init("MM",thisLocale).format(request.dDatum1);
request.sDatum1Jahr=jDateFormat.init("y",thisLocale).format(request.dDatum1);
</cfscript>

blow up the german text too?

> I always thought of it being latin-1 because my conversion tool told
> me it'll that encoding. And the MySQL status output also tells me that
> it uses 'latin1' as server and client characterset.

well these encodings are *almost* identical, some apps/people treat them as if 
they were identical.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231578
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to