2 Replies Latest reply on Dec 2, 2015 3:07 PM by Tim_Impact

    encoding

    Tim_Impact Level 1

      Using ColdFusion Builder Version: 3.0.0, Build: 292922

       

      I am having a problem with file encoding.  I have set the encoding to UTF-8 everywhere I can find but files are still in ANSI and words like résumé are saved as Résumé.  You can actually see the corrupted text if you look at the file with Notepad so it's not a content encoding display issue with http headers.  Brand new blank .cfm files created from the "New..." dialog in CF Builder seem to begin as UTF-8 but switch to ANSI if I re-save them.

       

      I have set UTF-8 in the following locations in CF Builder, none of which seem to help:

      Window > Preferences > General > Content Types > Text:  Default encoding set to "UTF-8" in field at bottom

      Window > Preferences > General > Workspace > Text File Encoding

      From Navigator window, R-Click my project and click "Properties", Resource, under Text file encoding set to UTF-8 (tried to inherited and explicitly set under "other")

      Edit > Set Encoding

       

      Is there another setting I am missing somewhere?

        • 1. Re: encoding
          charlie@carehart.org Adobe Community Professional & MVP

          So what do you in fact see when you open the file in question, and use Edit>Set Encoding. If it says UTF-8, then that is the encoding used for that file.

           

          You refer to seeing differences when you create a new file, versus when you save it. Again, I those two cases, what do you see in Edit>Set Encoding? Is that changing when you save it?

           

          If it’s not changing, and it does say it’s UTF-8 (which it should, by default, in CFB, unless one changes any of those more global settings you refer to), then perhaps your problem is not with encoding after all.

           

          I’m no expert in encoding issues, so I may be missing something in your problem. Just sharing some thoughts to help move the conversation forward, I hope.

           

          /charlie

          • 2. Re: encoding
            Tim_Impact Level 1

            Thanks charlie@carehart.org.  When I use Edit > Set Encoding, it does in fact show UTF-8, always, for both new and re-saved files.  The other reason I think it is being saved incorrectly, however, is that when I use Windows Notepad to open the file, in the Open dialog there is an Encoding field at the bottom.  It is an editable field, but as I click to highlight various files without actually opening them, the value in that field changes.  With CFM pages that do not have corrupted text (I have one left!) it takes the value UTF-8.  With CFM pages that do have corrupted text it takes the value ANSI.

             

            I am also far from expert (at anything, really ;-).  If anyone has a different explanation other than encoding for how the text is being corrupted I am all ears.  Thanks!