Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24973 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55325 invoked by uid 1010); 25 Jul 2006 22:38:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55310 invoked from network); 25 Jul 2006 22:38:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2006 22:38:53 -0000 X-Host-Fingerprint: 80.123.98.46 unknown Received: from ([80.123.98.46:23990] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 29/B7-04178-B7D96C44 for ; Tue, 25 Jul 2006 18:38:52 -0400 Message-ID: <29.B7.04178.B7D96C44@pb1.pair.com> To: internals@lists.php.net Date: Wed, 26 Jul 2006 00:39:03 +0200 User-Agent: Thunderbird 1.5.0.4 (X11/20060615) MIME-Version: 1.0 References: <006501c6b036$2f6f3e60$0100a8c0@pc07653> In-Reply-To: <006501c6b036$2f6f3e60$0100a8c0@pc07653> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.123.98.46 Subject: Re: upgrading the zlib extension to unicode From: mike@php.net (Michael Wallner) Nuno Lopes wrote: > Hello, > > So Andrei asked me to upgrade the zlib extension, but I have a few > questions I would like to discuss with you: I'd like to collaborate on this. Besides reimplementing the output handler to use the new API, I planned to upgrade it to something similar like http_encoding_api. > * when receiving an unicode string, what should we do? compress with > as-is, prepend a BOM header (and skip it while uncompressing)? (now > I'm unsure if PHP/ICU uses utf16 in the machine endianess or not) I think it should require a binary string. > * when uncompressing, check for a BOM header and return a unicode > string if it is present? return always a binary string? That would make it inconsistent if decoding data from a source other than PHP, thus I'd say--as before--a binary string. > I also have another question, but unrelated with the zlib extension, > that is what is a binary string in PHP 6? I think there were some > changes on that part (and there isn't the IS_BINARY by now) and I > don't really now the difference between a binary string and the old > string (aka runtime_encode'd string) IS_STRING is practically a binary string, AFAICT. Regards, -- Michael