Javascript file character encoding
SaraBJul 6 2010 — edited Jul 14 2010Hi
I'm currently using an Oracle XE database on my Windows 7 laptop with APEX 4.0 installed to test an application I've written in APEX 3.2 on a different server. When customers use the application they will be running it on an XE database in the same way as me, hence the test. My development environment uses APEX 3.2 on an XE database but it uses the 10g HTTP server whilst I'm using the EPG. I've uploaded all the JS files and images that we need (there's a few hundred of them) to the /i/ directory using Filezilla and imported the APEX application.
Most things appear to be working fine. :-) Except the application uses ckeditor as we need to do more with the text editors than is provided as default with APEX. On the pages that use ckeditor in FireFox I get javascript errors saying illegal character as the ckeditor.js script starts with a UTF8 byte order mask. When I go to the file address directly in FireFox I can see that the Character Encoding for the page is Western (Windows-1252). The first character of the ckeditor.js file is a UTF8 byte order mask, but as the file isn't being displayed as UTF8 it has an illegal character at the start and doesn't load. (Frustratingly this works fine in IE8, it appears to just ignore it but FireFox doesn't.)
All the pages of my APEX application have UTF8 character encoding, it is only the JS files that aren't. Presumably this is something to do with the EPG? I've looked at my database nls parameters and notice that the NLS_CHARACTERSET is set to WE8MSWIN1252. Doing a bit of reading this appears to be the character set that is used for the Oracle XE Western European database and UTF8 is used with the Oracle XE Universal database, but I could be wrong!
I can't just remove the first character from the ckeditor.js file, as this loads other .js files which all have the same problem.
Does anyone know how I can get the .js files that I've uploaded to /i/ as UTF8? I've tried searching for any information on this, but I'm not even sure that it's my nls_characterset setting that's causing the problem! Could there be another setting that I'm unaware of?
If you need any more information, please let me know.
Many thanks
Sara