6 Replies Latest reply: Oct 28, 2013 12:56 PM by iccsi RSS

    multi language characters

    iccsi Community Member

      I have an applicaiton to support English, French and Spanish.

      There are some characters with accent on the top for French and Spanish shows funny characters on the web pages.

      I see some web site can display those characters correctly.

      I would like to know are there any configuarion to do to display those characters correctly.


      Your help and information is great appreciated,





        • 1. Re: multi language characters
          duncancumming Community Member

          You need to ensure your content is served up as UTF-8.  On your pages stick this in the page header:

          <meta http-equiv="content-type" content="text/html; charset=utf-8" />


          Also in your .cfm files that handle foreign characters, you might also require this (depending on how you're doing it, e.g. you don't specify if the content is written directly into the HTML source, if you're hardcoding it in ColdFusion variables, or getting it from the DB).

          <cfprocessingdirective pageencoding="utf-8" />


          And you should make sure that the files are saved as UTF-8, not ASCII

          • 2. Re: multi language characters
            iccsi Community Member

            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


            Thanks for the message and help,

            I have above code on top of my cfm file.

            Do I need cfprocesssingdirective for every single cfquery and cfstrocporc to show special characters?


            How can I save a UTF-8? I used save as my cfm file, it has unicode normalization option, but there is no save as UTF-8 or unicode option for cfm save as?


            Thanks again for the information and helping,





            • 3. Re: multi language characters
              duncancumming Community Member

              If you've got hardcoded UTF-8 encoded text in your cfm or cfc files, then you'll need the cfprocessingdirective in each of those that handles that data.


              If the text is coming from your DB, it shouldn't matter.


              What's your text editor?  It should have an option for what type of file encoding to use.

              • 4. Re: multi language characters
                iccsi Community Member

                I use Dreamweaver CS 6.

                I use MS SQL Server as backend and I use nvarchar for my string data type which should support unicode.


                do you mean any text in the HTML code I need cfprogressingdirective to support UTF-8?

                How about the code in javascript?

                Do I need any special function or format to support unicode?


                Thanks again for helping,





                • 5. Re: multi language characters
                  duncancumming Community Member

                  This link might be helpful for explaining how to set file encoding in Dreamweaver:

                  http://helpx.adobe.com/dreamweaver/using/creating-opening-documents.html#set_default_docum ent_type_and_encoding


                  If you had some CFML like:


                  <cfset name = "双喜">


                  You'd want that file to have the cfprocessingdirective at the top of the file.  If that file was itself perhaps cfincluded from another file, both files would need the cfprocessingdirective.


                  If however it was coming direct from the DB, it wouldn't matter.  However if you were outputting it into some Javascript or HTML, that file would need to be rendered using UTF-8 encoding.  Which might also need to be done at the webserver.

                  • 6. Re: multi language characters
                    iccsi Community Member

                    Thanks a milliong for the information and help,