Most likely your editor saves the templates with a BOM (just google it). Found this on the web regarding editplus:
... but it could have something to do with
the Byte Order Mark (BOM). Most web pages don't use the BOM because it
can cause display problems in some browsers. You may want to check to
see that "Support UTF-8 files without Byte Order Mark" checked in the
preferences under "Files".
Although BOM has it's uses, I've never seen in welcome in web/PHP encoded applications (utf-8 encodings). Always avoid it at all costs, and that can be done by choosing editors which handle it in a controlled way (either remove it altogether or simply keep it only if had been there before). It used to be a problem to find those editors some years ago, but I guess not so much anymore. As stated in the Wiki article, many Windows editors, including notepad, prepend it automatically when they assume a file is UTF-8 encoded.
Another way to remove unnecessary BOMs is to write a simple (PHP) script that searches for it in the application files recursively and removes it, if found. It's a good idea to store the pattern of BOM in an empty UTF-8 file (it will have 3 bytes). Just backup your application beforehand :)
Sometimes, when cache is not used, web pages are broken (with ie7). When it happens, there is a BOM at the beginning of the HTML source of the page. I have checked the templates, their format is ANSI.
Maybe there is a file I have forgot to check wich contains the BOM. Is there an other possible explanation ?
(I finally found some files with the BOM.)
You must be logged in to post messages in this topic!