Skip to main content
June 7, 2006
Question

French accent display problem

  • June 7, 2006
  • 3 replies
  • 958 views
I have a problem displaying french accent in a cfmail. I have tried everything but nothing seems to work.

Here is the code for the best i can do... only é is rightly displaying other like à, è, ê, â, etc. appears bizzar caracters...

how the hell can i display my accent correctly..... pleeeeease help mee...

<cfmail query="check" to="test@hotmail.com" from="noreply@hotmail.com" subject="#form.sujet#" type="HTML">
<cfset SetLocale("French (Canadian)")>
<cfprocessingdirective pageencoding = "windows-1250" />
<cfcontent type="text/html; charset=windows-1250">
<cfset setencoding("URL", "windows-1250")>
<cfset setencoding("FORM", "windows-1250")>
#form.message#
</cfmail>

Is there a special tag that would finally work to display accent correctly... i desperate!!!
    This topic has been closed for replies.

    3 replies

    Inspiring
    June 8, 2006
    tilanteigne wrote:
    > <cfmail query="check" to="serge.lanteigne@acadie.com"
    > from="info@ent-peninsule.ca" subject="#form.sujet#" type="HTML">
    > <cfset SetLocale("French (Canadian)")>
    > <cfprocessingdirective pageencoding = "windows-1250" />
    > <cfcontent type="text/html; charset=windows-1250">
    > <cfset setencoding("URL", "windows-1250")>
    > <cfset setencoding("FORM", "windows-1250")>
    > #form.message#
    > </cfmail>

    first off the encoding tags/functions shouldn't go within the cfmail. secondly,
    windows-1250 is a codepage for central european languages like polish, czech, etc.

    move the setencoding & cfcontent to your application.cfm or .cfc & either use
    iso-8859-1 or utf-8 as the encoding. place the cfprocessingdirective at the top
    each page & also set the encoding to iso-8859-1 or utf-8.
    June 14, 2006
    Well.. good stuff. That works for my cfmail now. But all the information output from the database replace accent by a ?. If I remove the setencoding & cfcontent from my application.cfm, its work for the output but not for the cfmail. Do you have an idea to help me out?????
    June 7, 2006
    No, we're still on CF 5.
    June 7, 2006
    Remove all the CFSETs, CFPROCESSINGDIRECTIVE and CFCONTENT. Just your <CFMAIL ...>#FORM.message#</CFMAIL> I ran the code below on one of our servers internally and it mailed everything correctly.
    June 7, 2006
    I have already tryied that... doesn't work. i never had problem with CF5 but i got this problem with CFMX. Do you have CFMX server??