Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17784 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17484 invoked by uid 1010); 10 Aug 2005 13:26:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 17469 invoked from network); 10 Aug 2005 13:26:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Aug 2005 13:26:33 -0000 X-Host-Fingerprint: 195.226.9.186 unknown Received: from ([195.226.9.186:14867] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id DE/CF-24081-8800AF24 for ; Wed, 10 Aug 2005 09:26:32 -0400 Message-ID: To: internals@lists.php.net Date: Wed, 10 Aug 2005 15:26:28 +0200 User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <937066F0-AA5F-41E2-99A0-D74C7F44FFCA@gravitonic.com> <1B.49.24081.1DAD9F24@pb1.pair.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 195.226.9.186 Subject: Re: [PHP-DEV] Re: PHP Unicode support design document From: cschneid@cschneid.com (Christian Schneider) Derick Rethans wrote: > On Wed, 10 Aug 2005, Ron Korving wrote: >>"In order to create binary string literals, a new syntax is necessary: >>prefixing a string literal with letter 'b' creates a binary string." >> >>The b-prefix for binary strings is great, but how does that work with a >>function like file_get_contents() or fread() ? >>One can't do: $data = bfile_get_contents("somefile.bin"); > > fopen() and file_get_contents() already understands a context parameter, > specifying whethter you'd want to have binary or string/unicode data can > be done through that. We create images in PHP scripts and pass them through with readfile("foo,gif"). Did I understand correctly that this would still work without changes? But echo file_get_contents("foo.gif") would fail, right? This is not a complaint, just trying to understand the implications, - Chris