The problem might come from the messages posted with the form.
With CFMX, you have to explicitly specify the character encoding for the
"form" and "url" scope.

If you put the following code in your Application.cfm, it shoud solve the
problem :
<cfscript>
setEncoding("form", "utf-8");
setEncoding("url", "utf-8");
</cfscript>
<cfcontent type="text/html; charset=utf-8">

It is explained in the CF docs, but I am pretty sure that many developers
spent hours/days to understand what was going on, this is completely new to
CFMX.
(I don't understand why CFMX does not have those setting by default)

If you post the form with enctype="multipart/form-data" (to upload files),
you'll also have to use the following function :
<cfscript>
function getMultipartFormParameter(key, encoding) {
        param = key.getBytes(encoding);
        value = evaluate(toString(param, "ISO-8859-1"));
        param = value.getBytes("ISO-8859-1");
        return toString(param, encoding);
}
</cfscript>

In the script receiving the form, you have to use the function for each
fields :
<cfset CorrectlyEncodedTitle = getMultipartFormParameter("form.Title",
"utf-8")>

This issue has been raised during the beta and MM hasn't solved it.
It is extremely annoying for any non "English-speaking" applications (and I
don't think that it is explained anywhere).


Benoit Hediard
http://www.benorama.com


-----Message d'origine-----
De : cfhelp [mailto:[EMAIL PROTECTED]]
Envoy� : mardi 3 septembre 2002 14:38
� : CF-Talk
Objet : Funny Charictors in Text emails


In our email community messages are sent in by email or through the form on
the web site.

The messages are enter in the database using CFPOP. When they show up in the
moderation web site they look fine but when the messages are approved and go
out to the subscribers they have funny characters in them.



---------------- Example Message:---------------------
Message ID: 14666


Date: 09/03/2002
From: Info-Portal Storiestexte
Email: [EMAIL PROTECTED]
Subject: Re: Kashmir (Martin Schwarz)

The conflict in Kashmir in fact may be a mirror of the conflict in the
Middle East. We did a little analysis on our website (in German) about that
and after some talks with experts I'm convinced that (in both conflicts) the
main reason is, that the British Empire more or less hurried to leave their
former colony without any idea about the future of these regions. The
conflict in Kashmir didn't start in 1947, so there is no reason to believe
that the main question was which country �?? India or Pakistan �?? would
�??implement�?� the province. But later, the two states have
instrumentalised the Kashmir problem for their path to an hegemony of the
whole region.

-----------------------END  Example Message:--------------------


This just started after moving from CF4.5 to CFMX.

Rick



______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to