#22108 [Com]: php doesn't ignore the utf-8 BOM

From: Date: Thu, 03 Jul 2003 19:59:46 +0000
Subject: #22108 [Com]: php doesn't ignore the utf-8 BOM
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-43209@lists.php.net to get a copy of this message
 ID:               22108
 Comment by:       jaanus at heeringson dot com
 Reported By:      bugzilla at jellycan dot com
 Status:           Assigned
 Bug Type:         Feature/Change Request
 Operating System: Any
 PHP Version:      All (as of the current implementation)
 Assigned To:      moriyoshi
 New Comment:

There are some consequenses that are not mentioned in the above
comments. More than one BOM renders a perfectly valid XHTM file
non-valid. Apparently the XHTML specification allows BOM characters,
but only ONE, not multiple which is what you get if you include other
utf-8 files (include, require). This in turn results in the possibility
that the xml declaration in not read since it is not found. This is the
case with the w3c validator.


Previous Comments:
------------------------------------------------------------------------

[2003-06-04 03:11:51] moriyoshi@php.net

That script appears to be written in UTF-16. As for UTF-16, it could
actually be a parser problem as well, but this report addresses the
issue related to UTF-8.

------------------------------------------------------------------------

[2003-06-04 02:59:33] derick@php.net

Actually, not totally. A friend mailed me a PHP script, which had the
annoying BOM AND the whole file was in double byte (saved by
notepad)... which definitely makes it a parser problem too (\0 < \0 ?
\0 p   doesn't match "<?p" for example).

------------------------------------------------------------------------

[2003-06-04 02:56:01] moriyoshi@php.net

And just for clarification, this is a scanner problem, irrelevant to
the parser.


------------------------------------------------------------------------

[2003-06-04 02:45:43] derick@php.net

It wasn't assigned, just set to open (and I didn't notice your name in
the "Assign to" field).

------------------------------------------------------------------------

[2003-06-04 02:40:30] moriyoshi@php.net

Derick,

Please do not change the status of the bug that is already assigned to
someone.

There's no point that PHP can only handle ASCII documents because if
you want to use German in PHP for example, at least you have to use
ISO-8859-1 or ISO-8859-15, which is not even part of ASCII.


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/22108

-- 
Edit this bug report at http://bugs.php.net/?id=22108&edit=1



Thread (47 messages)

« previous php.bugs (#43209) next »