You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jan Ingvoldstad <fr...@gmail.com> on 2009/10/07 13:49:17 UTC

Re: [users@httpd] Using SSI to include a UTF-8 encoded file causes a strange character to be sent to the browser

On Wed, Oct 7, 2009 at 10:55 AM, André Warnier <aw...@ice-sa.com> wrote:

> 1) *don't use Notepad to edit HTML pages*.  Use a real editor, properly
> aware of character sets and encodings, and which will highlight incorrect
> UTF-8 characters.
> Notepad has a big problem when saving UTF-8 encoded files : it writes a
> "BOM" at the beginning of the file, which is not only totally unnecessary
> for UTF-8, but also confuses other programs.
> A BOM is a sequence of 2 or 3 bytes, meant in some cases to indicate the
> "byte order" of the file that follows.
>

Just for the sake of information, DreamWeaver MX also pulls this nice stunt,
_also when editing PHP files_.

This can lead to annoying problems when a PHP script tries to modify the
HTTP headers, since the headers will already have been written, and
(depending on PHP solution; mod_php, fastcgi, suphp etc.) will produce nasty
errors.

When you open a file with a BOM in a UTF-8 aware editor, the BOM is hidden.

Software producing BOM makes things go BOOM.
-- 
Jan