um...

ok,

On my machine, using cfheader works the way you want it to, using cfcontent doesn't.

Also, you need to make sure that you have the cfheader call right at the start of the request so the header gets generated before any content. I've run into problems with that in the past.

Spike

Jon Hart wrote:
Message
 >  <cfheader name="content-type" value="Content-Type: text/html; charset=UTF-8">
 
cfcontent works, I can inspect the headers and see that it being set.
The browser isnt confused about the encoding of the page. If I set cfcontent ( or leave it to default )
then the page encoding is set to UTF-8, as it should.
 
Ive found this:
<cfprocessingDirective pageencoding="iso-8859-1">
 
which in the case of this simple sample makes it work the way it should.
It certainly feels like cfmx is screwing around with the output text.
Unfortunately it doesnt help my much more complex site.
 
 
<html>
<head>
 <cfcontent type="text/html; encoding=UTF-8">
 <cfprocessingDirective pageencoding="iso-8859-1"> 
</head>
 <body>
   <cfoutput>
    Sample string for testing ファックス<br>
 #chr( inputBaseN( "E3", 16 ) )##chr(  inputBaseN( "83", 16 ) )##chr(  inputBaseN( "95", 16 ) )##chr(  inputBaseN( "E3", 16 ) )##chr(  inputBaseN( "82", 16 ) )##chr(  inputBaseN( "A1", 16 ) )##chr(  inputBaseN( "E3", 16 ) )##chr(  inputBaseN( "83", 16 ) )##chr(  inputBaseN( "83", 16 ) )##chr(  inputBaseN( "E3", 16 ) )##chr(  inputBaseN( "82", 16 ) )##chr(  inputBaseN( "AF", 16 ) )##chr(  inputBaseN( "E3", 16 ) )##chr(  inputBaseN( "82", 16 ) )##chr(  inputBaseN( "B9", 16 ) )#
   </cfoutput>
  </body>
</html> 
 
 
 
Jon.

-- 
Stephen Milligan
Consultant for hire
http://www.spike.org.uk

Reply via email to