Just to follow-up to this: 

As we state in the docs, when two CFM files contain different character encodings, but 
a BOM is missing from one or more of the .CFM files, AND no CFPROCESSINGDIRECTIVE is 
specified, the default OS encoding will be used.

This basically tells the CFMX compiler, which must "open" your CFM files, and which is 
written in Java, which Java encoding to use when it "opens" the CFM file to process 
and compile it, so that the appropriate Java reader is used.

You cannot, for example, set a BOM in the Application.cfm file and have it "cascade" 
down through your application CFM files.  Your CFM template editor needs to be saving 
the BOM encoding for all your templates if you're storing encoded data in your CFM 
files.

Some tips:

1) When the ColdFusion compiler begins processing a page, it searches for a byte order 
mark (BOM). Processing is as follows: 

        a) If a BOM is present, ColdFusion uses the encoding that it specifies to read 
and parse the page. 
        b) If no BOM is present, ColdFusion uses the VM/system's default encoding to 
read and parse the page. 

2) Macromedia recommends that you encode all international application pages as UTF-8 
with a byte-order mark (BOM), so that ColdFusion automatically detects the page as 
UTF-8 encoded; no CFPROCESSINGDIRECTIVE tag is needed. The BOM sets the first byte of 
a UTF file, so the program (in our case the CFMX compiler) reading the CFM file 
recognizes which encoding is in use.

3) If you think you may ever care about writing i18N-aware or L10N web apps, please 
bookmark and read this: 
http://www.macromedia.com/support/coldfusion/internationalization.html 
<http://www.macromedia.com/support/coldfusion/internationalization.html> 


Hope that helps.  
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to