Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18899 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27709 invoked by uid 1010); 14 Sep 2005 14:02:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27687 invoked from network); 14 Sep 2005 14:02:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2005 14:02:49 -0000 X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:58522] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 0A/11-41173-88D28234 for ; Wed, 14 Sep 2005 10:02:48 -0400 Received: from localhost (strato.aixcept.de [81.169.182.136]) by strato.aixcept.de (Postfix) with ESMTP id 6BDC735C384; Wed, 14 Sep 2005 16:25:28 +0200 (CEST) Date: Wed, 14 Sep 2005 16:02:40 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <463148328.20050914160240@marcus-boerger.de> To: Antony Dovgal Cc: Andrei Zmievski , php-dev , Dmitry Stogov In-Reply-To: <432194F7.6000703@zend.com> References: <43215A91.8050409@zend.com> <9CF57DC5-A18B-4264-B20B-8552B0BB66F1@gravitonic.com> <432194F7.6000703@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] unserialize() & unicode issues From: helly@php.net (Marcus Boerger) Hello Antony, why can't we put a marker there? shouldn't we be able to add a flag and allow that flag in older php versions disallowing to load those serialized data in case it shows unicode semantics? Right now we'd simply fail in case of unicode usage in any serialized data with old php versions. Adding those types now would at least to show a more specific and thus helpful error message. On te other hand havin the semantics flag being optional would allow HEAD to unserialize data from older version without any problem. regards marcus Friday, September 9, 2005, 3:58:15 PM, you wrote: > On 09.09.2005 17:44, Andrei Zmievski wrote: >> Yes, serialization is a problem. I would actually advocate putting a >> marker in the serialized file that indicates what the value of >> unicode_semantics switch was during the serialization, and if the >> value is different during deserialization, refuse to load it or start >> a new session. One really should not be changing that switch on a >> whim in-between sessions. > Why? It loads/works perfectly fine except for the problems I've mentioned. > Also, you can't put any markers to the serialized _text_ (at least it > sounds very bad to me), so it won't help you in this case. Best regards, Marcus