Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49180 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1263 invoked from network); 29 Jul 2010 22:49:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2010 22:49:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 ns.km36107.keymachine.de Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:59396] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/16-03376-D75025C4 for ; Thu, 29 Jul 2010 18:49:34 -0400 Received: from [192.168.1.31] (ppp-93-104-49-36.dynamic.mnet-online.de [93.104.49.36]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id C10BE44C20; Fri, 30 Jul 2010 00:49:29 +0200 (CEST) To: Ferenc Kovacs Cc: PHP Internals In-Reply-To: References: <1280440681.10693.5.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Date: Fri, 30 Jul 2010 00:49:28 +0200 Message-ID: <1280443768.10693.13.camel@guybrush> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] --enable-zend-multibyte From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Fri, 2010-07-30 at 00:33 +0200, Ferenc Kovacs wrote: > > Ignoring the BOF might cause not expected behavior: Assume people are > > using PHP as "templating" language and want the BOM to go out to the > > client. > Do you think that this is a common scenario? > Apart from a case, when I had to create utf-8 csv files for Microsoft > Excel, I never needed to send BOM from php, and for that particular > case, I sent it with an explicit echo, not with an "invisible" control > sequence in my code. Well, PHP doesn't change what is written outside (*) so hiding "random" bytes (PHP doesn't know what these bytes mean, PHP only knows collections of bytes as strings with no further logic) might easily break expectations and cause problems which are harder to trace down than a "headers already sent" error which is relatively verbose. johannes *) Yes there is one behavior which might be seen as an exception: If ?> is directly followed by a new line the new line is dropped, but then the new line can be seen part of the ?>. Example: a b Prints ab without line break.