Skip navigation
lentonator
Currently Being Moderated

Non English character sets failing.

May 31, 2012 12:59 PM

Tags: #server #client #browser #url #cf9 #special_characters

Good day,

 

My team is having trouble serving HTML pages that contain special characters (accented French e.g. été).

 

On some of our pages it works fine, but on most it displays 'été' as 'été'. I have been unable to isolate the issue though I expect it is nested in the server somewhere.

 

I say this because if I load the same HTML page from two separate URLs one displays characters correctly, and the other does not.

 

The files on the server are exactly the same, but on the client side the accented characters do not display.

 

This leads me to the conclusion that it isn't something to do with content-type or other header data, but rather the server has decided not to interpret the characters correctly.

 

I'm open to suggestions.

 
Replies
  • Currently Being Moderated
    Jun 1, 2012 5:21 AM   in reply to lentonator

    When you say this:

     

    if I load the same HTML page from two separate URLs one displays characters correctly, and the other does not.

     

     

    Do you mean the URLs point to the very same file, or just two files that are "the same" (if it's two files, they're clearly not the same ;-)

     

    Where's the text that's not rendering sourced from?  Is it from the DB or hard-coded in your source code?  You might have to tell your JDBC connector to use unicode if it's coming from the DB; if it's in a file, then you need a <cfprocessingdirective> at the top of the file to tell CF to compile it as unicode, not ascii.

     

    If you're testing with two separate files, I suspect one is saved with UTF-8 encoding, and one without.  You can check this by opening them in notepad, and going save-as (you don't need to actually save it).  It'll tell you which encoding the file is saved using.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 1, 2012 6:38 AM   in reply to lentonator

    I'm hesitant to leave it to CF to work out a file's encoding, and always let it know with the <cfprocessingdirective>: I've had mixed results without it.

     

    But mileage varies, so up to you.

     

    --

    Adam

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points