Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26046 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67754 invoked by uid 1010); 12 Oct 2006 21:33:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67726 invoked from network); 12 Oct 2006 21:33:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2006 21:33:39 -0000 Authentication-Results: pb1.pair.com header.from=andrei@gravitonic.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrei@gravitonic.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gravitonic.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from [204.11.219.139] ([204.11.219.139:34564] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/FB-22864-1B4BE254 for ; Thu, 12 Oct 2006 17:33:38 -0400 Received: from [172.27.173.217] ([66.194.95.2]) (authenticated bits=0) by lerdorf.com (8.13.8/8.13.8/Debian-2) with ESMTP id k9CLXXsh006452; Thu, 12 Oct 2006 14:33:34 -0700 In-Reply-To: <0C.0A.22864.223BE254@pb1.pair.com> References: <638D2DBE-1C6E-46F4-B1FF-1B3E16F0E889@gravitonic.com> <0C.0A.22864.223BE254@pb1.pair.com> Mime-Version: 1.0 (Apple Message framework v752.2) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Thu, 12 Oct 2006 16:33:24 -0500 To: Sara Golemon X-Mailer: Apple Mail (2.752.2) Subject: Re: [PHP-DEV] Re: cast_object handler patch From: andrei@gravitonic.com (Andrei Zmievski) On Oct 12, 2006, at 4:26 PM, Sara Golemon wrote: > How does this impact userspace __toString() handlers? Would we > pass the > encoding from the converter to them? > > function __toString($encoding) { } > Do we need __toUnicode($encoding) as well? > > Would we just let the user pass back *whatever* type then convert > as needed > in the internal cast handler? Right, I was thinking that they would just return Unicode or binary strings and the standard object handler takes care of converting it. That's the way it's currently implemented. -Andrei