JasonDFR wrote:I save all of my scripts as UTF-8 and have never had a problem. Should I be worried? Under what conditions can there be problems?
EDIT: I do not write the unicode BOM however.
I don't know if it's different for different platforms/web servers/editors.
Certainly with the editors that I use, if I save a file as UTF-8, then it automatically writes a BOM header to that file, which is totally transparent unless I view the file in a binary editor.
However, when the web server processes that file, it may see the BOM header as output and send it to the browser. Becaue it's the first thing in any file, then it gets sent before any headers in the script... and the web server sends its default headers, then the BOM marker as output.
I prefer not to take the risk, and have no need to do so because I don't embed anything that requires UTF-8 within the scripts themselves.
I've seen too much of other people having problems to want to fall into the same trap myself