A few of our source code files contain Spanish text strings and smart quotes (i.e. curly quotes) copied from MSWord and pasted into Eclipse. These “special characters” have never caused problems in CFEclipse, but they were showing up as little boxes in CFBuilder:
I knew it was a file encoding issue but couldn’t solve it. The default text file encoding (window – preferences – general – workspace -– Text file encoding) was Cp1252, which was the same as CFE. However, viewing the properties of a file showed that the file was UTF-8 in CFBuilder but still Cp1252 in CFEclipse.
To get CFBuilder to behave like CFEclipse with respect to file encoding:
- Window – preferences – general – Content Types
- Expand the “Text” tree
- Select “CFML Source File”
- Down at the bottom, change the Default encoding
Warning: I wouldn’t change this setting unless you’re experiencing this problem yourself. To be clear, this falls into the “if you must do dumbass stuff like copy text from Word into Eclipse and retain the funky characters, then here’s how to fix it”