I'm using Railo 3. for any web application (setup exactly like this excellent guide). I've got a CFM page that delivers some old HTML files while using cfcontent tag. The information is within various character sets (all understood to be meta data within the HTML). However , my CFM pages are becoming sent with UTF-8 occur the HTTP response headers, which overrides anything defined within the HTML. The web pages therefore get displayed improperly within the browser.
How do i steer clear of the charset being submitted the HTTP headers for CFM pages?
Notes: I have removed the AddDefaultCharset entry in the default Apache config, and which means that static HTML pages are actually offered with no charset within the header, however this did not help for CFM pages - AddDefaultCharset is bad, bad, bad
I understand it is really an old thread, but I've had an identical problem lately and transformed it while using underlying java servlet context. When you get your hands on the ServletResponse you are able to call .totally reset(), which based on the Java paperwork states:
Clears data that is available within the buffer along with the status code and headers.
You will need to rewrite All of the headers on your own, however it will obvious the rogue charset header.
<cfset objResponse = GetPageContext().getResponse()> <cfset objResponse.reset()>
This works in Railo. In CF (Adobe) I want to call getResponse() two times to acquire the right response object.
Hope that can help someone.
what charset are you currently attempting to send the web pages out as? you are able to pressure the charset from the page a few ways:
<cfheader name="charset" value="windows-1252">