Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49181 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2622 invoked from network); 29 Jul 2010 22:54:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jul 2010 22:54:35 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:52386] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/66-03376-AA6025C4 for ; Thu, 29 Jul 2010 18:54:35 -0400 Received: by fxm17 with SMTP id 17so689785fxm.29 for ; Thu, 29 Jul 2010 15:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=MCgld1XdemNjID7rSX6ja/RrZkch4bXTNQ4eRssg2gE=; b=BFnJVdJLHqJZl/LJ+C9C7x3XuXKXgwCwazFUuYQH7pQIZWw9UxrSgTvk5kTmkCAv4F H7FzPwr0C9xTZHSyycXlJwMxLtmnKqzyKAJpkBFYop1naUfIN0ZPnrkNzCgf4/0tHmxo saGvq1cOgYvBo8Y/uqHGSa8kS9oqbVeTGDjb0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=td5N2P/WadyVqWmfmFlef/IrvwDp/0yN4/bJiyBa6bBoB4CAgqTB0fCgp6SMAIP7H+ drmJH0vWWPZQcItT0urlUBT2jg6L13VrMLqH+hPDJ5ohfK2LQK0MQ8jI7yDXa2vdy7KQ OvjINQpy6dcGDEdXZYAR4t+63Q10n81ff+FY8= MIME-Version: 1.0 Received: by 10.239.152.12 with SMTP id t12mr57602hbb.7.1280444071339; Thu, 29 Jul 2010 15:54:31 -0700 (PDT) Sender: tyra3l@gmail.com Received: by 10.239.161.200 with HTTP; Thu, 29 Jul 2010 15:54:31 -0700 (PDT) In-Reply-To: <1280443768.10693.13.camel@guybrush> References: <1280440681.10693.5.camel@guybrush> <1280443768.10693.13.camel@guybrush> Date: Fri, 30 Jul 2010 00:54:31 +0200 X-Google-Sender-Auth: vrkeZjGi7N_ggkHMxkX6IWPITTo Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] --enable-zend-multibyte From: info@tyrael.hu (Ferenc Kovacs) 2010/7/30 Johannes Schl=C3=BCter : > 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. > > I see your point. I can not come up anything better than your first idea. Tyrael