views:

147

answers:

1

I am using Railo 3.0 for a web application (setup exactly the same as this excellent guide). I have a CFM page that serves up some old HTML files using the cfcontent tag. This content is in various character sets (all defined as meta tags in the HTML). The problem is that all my CFM pages are getting sent out with UTF-8 set in the HTTP response headers, and this overrides anything defined in the HTML. The pages therefore get displayed incorrectly in the browser.

How can I stop the charset being sent in the HTTP headers for CFM pages?

Notes: I've removed the AddDefaultCharset entry from the default Apache config, and this means that static HTML pages are now served without any charset in the header, however this didn't help for CFM pages - AddDefaultCharset is bad, bad, bad

A: 

what charset are you trying to send the pages out as? you can force the charset of the page a couple of ways:

<cfprocessingdirective pageEncoding="windows-1252">

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_13.html#2962107

<cfheader name="charset" value="windows-1252">

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_07.html#3989067

rip747
The documents are various charsets (e.g windows-1252, us-ascii ..), which are defined in the HTML meta tag. What I am hoping to do is not send anything about charset in the HTTP Header, and leave it to the browser to get it from the HTML.
Guy C
this sounds more like an apache problem then a coldfusion (railo) one. why don't you try taking railo out of the picture and see what happens. pull up one of the cfm templates that are giving you the problem in your browser and then view the source, copy and paste it into an html file. save that, and call that from your browser. see what charset is sent back to you from apache at that point.
rip747