Coldfusion server not displaying accents correctly

I have a .cfm page/form with french words that have accents.  When displayed in any browser the accents don't display correctly.  If I change the extension from .cfm to .html and serve the page from the same directory the accents appear just fine (but the form is worthless).  It seems like there needs to be some configuration on the server side but I haven't found what that might be.  Is there config that needs to be done on the server side to get coldfusion to display accents correctly and what would it be?

Everything I've been able to find is that you need to use utf encoding in the page which I am but doesn't seem to matter to coldfusion
Code snippet:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Session 2</title></head>
<!---the "action" attribute has the form submit the information to this page (or itself), where the <cfif isdefined("form.submit")> tag takes over, processing the form data--->
<cfform id="form1" name="form1" method="post" action="session_2.cfm">
  <p align="center"><strong>Session 2</strong></p>
    <!--- below is where the validation takes place, there is the required directive and then the message to display if a selection has not been made.  This needs to be coded for every field in the form--->
    <cfinput type="text" name="prenom" id="prenom"
     required = "Yes"
      message = "Please enter a prénom"  />
  <cfinput type="text" name="nom" id="nom" 
   required = "Yes"
      message = "Please enter a nom"  />
  Numéro de 4 chiffres  </p>
  <p><strong>A  Composition</strong></p>
  <p>Votre meilleur(e) ami(e) vient de vous envoyer ce courriel:</p>
  <p>I decided to leave for China tomorrow morning! I'm not taking anything with me, I don't have any money, I don't speak Chinese and it's the first time I'm going on a trip. I know it sounds crazy but I cannot stand my parents anymore, especially my mother. She drives me crazy and I hate my step-father! So, I'm leaving morning and I don't know when I'll come back. Adieu!</p>
  <p>Empêchez votre ami(e) de commettre cette énorme erreur. Conseillez-le/la en lui écrivant une lettre (en anglais bien sûr) avec un minimum de 15 verbes ou expressions verbales différents. Cliquez dans l'espace ci-dessous pour commencer à écrire.</p>
    <cftextarea name="composition" id="composition" cols="80" rows="25" required="yes" message="Please enter a composition"></cftextarea>
  <p><strong>B  Complétez les phrases </strong></p>
  <p>Complétez les phrases suivantes en choisissant la forme correcte du verbe pour que la phrase soit logique et grammaticale. </p>

Open in new window

Who is Participating?
which cf version are you on?
which db? which version? if it is ms access - are you using Access with Unicode driver in your cf dsn setup?
are the accented characters that do not display properly coming from your db, or are they plain-text in the page?

cf versions after 5 all use utf-8 as default page encoding. but your tables and db driver also have to use utf-8 charset/collation.

if you are using Application.cfm, include the following code in it:
<cfcontent type="text/html; charset=utf-8">

(if you are using Application.cfc, include similar code in onRequestStart() method)

you may also need to include <cfprocessingdirective pageencoding="utf-8"> at the top of every page in your site...

but i would start with making sure your db and cf 'speak the same language' - use the same charset and encoding (utf-8)

mwbryAuthor Commented:
I am using Coldfusion 7.  There is no database involved in this application.  The form data writes a .txt file back to the directory from which the .cfm form is served so it's not an issue of displaying or writing data from or to a database.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.