Re: [PHP-DEV] unserialize() & unicode issues

2005-09-14 Thread Antony Dovgal
On 15.09.2005 00:12, Marcus Boerger wrote: Well right now we don't fail gracefully Right, but it could be done easily. and i don't think we should unless we are dealing with something introduced in later versions that doesn't hurt or to generate helpfull error messages that explicitly tell yo

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-14 Thread Marcus Boerger
Hello Antony, Wednesday, September 14, 2005, 8:58:31 PM, you wrote: > On 14.09.2005 18:02, Marcus Boerger wrote: >> 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

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-14 Thread Antony Dovgal
On 14.09.2005 18:02, Marcus Boerger wrote: 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? You mean adding a marker to be able to fail wi

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-14 Thread 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 versio

Re[2]: [PHP-DEV] unserialize() & unicode issues

2005-09-14 Thread val khokhlov
Hello Tex, Wednesday, September 14, 2005, 1:07:26 PM, you wrote: TT> Bear with me, I don't know about how PHP uses the serialized info, but if TT> your goal is to minimize the overhead for unicode data when no, now we're discussing the following issues: 1) should serialize format be port

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-14 Thread Derick Rethans
On Tue, 13 Sep 2005, Antony Dovgal wrote: > > But needed, as even with the semantics off, you can get unicode strings. > > Which can end up as array keys. > > Yes, in this case there is no way to avoid converting (while doing > unserialize()), but I don't see any point in creating Unicode strings

RE: [PHP-DEV] unserialize() & unicode issues

2005-09-14 Thread Tex Texin
! Inc. > -Original Message- > From: Pierre Joye [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 13, 2005 3:44 AM > To: Antony Dovgal > Cc: Derick Rethans; val khokhlov; internals@lists.php.net > Subject: Re: [PHP-DEV] unserialize() & unicode issues > > &g

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-13 Thread Pierre Joye
On 9/13/05, Antony Dovgal <[EMAIL PROTECTED]> wrote: > Yes, in this case there is no way to avoid converting (while doing > unserialize()), > but I don't see any point in creating Unicode strings when serializing with > unicode_semantics is Off. If I use serialized data on different hosts with

Re[2]: [PHP-DEV] unserialize() & unicode issues

2005-09-13 Thread val khokhlov
Hello Antony, Tuesday, September 13, 2005, 12:42:57 PM, you wrote: AD> So you propose to store strings/hash keys/class names in Unicode AD> even if unicode_semantics is Off ? yes - those items that are encoded into unicode when unicode_semantics is on (afair, class names and property name

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-13 Thread Antony Dovgal
On 13.09.2005 13:52, Derick Rethans wrote: On Tue, 13 Sep 2005, Antony Dovgal wrote: On 13.09.2005 13:32, val khokhlov wrote: > Hello Antony, > > Tuesday, September 13, 2005, 11:21:21 AM, you wrote: > > AD> Even if the class name is in Unicode, we can try to convert it to ASCII > AD> and fai

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-13 Thread Derick Rethans
On Tue, 13 Sep 2005, Antony Dovgal wrote: > On 13.09.2005 13:32, val khokhlov wrote: > > Hello Antony, > > > > Tuesday, September 13, 2005, 11:21:21 AM, you wrote: > > > > AD> Even if the class name is in Unicode, we can try to convert it to ASCII > > AD> and fail only in the case when we can't

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-13 Thread Antony Dovgal
On 13.09.2005 13:32, val khokhlov wrote: Hello Antony, Tuesday, September 13, 2005, 11:21:21 AM, you wrote: AD> Even if the class name is in Unicode, we can try to convert it to ASCII AD> and fail only in the case when we can't find its class entry in the list. I think, it's not the o

Re[2]: [PHP-DEV] unserialize() & unicode issues

2005-09-13 Thread val khokhlov
Hello Antony, Tuesday, September 13, 2005, 11:21:21 AM, you wrote: AD> Even if the class name is in Unicode, we can try to convert it to ASCII AD> and fail only in the case when we can't find its class entry in the list. I think, it's not the only way. If we don't care about bein

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-13 Thread Antony Dovgal
Even if the class name is in Unicode, we can try to convert it to ASCII and fail only in the case when we can't find its class entry in the list. So, I don't see any need in markers and other fairly major changes. On 13.09.2005 04:54, Andi Gutmans wrote: Not coming with a solution, but I believ

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-12 Thread Andi Gutmans
Not coming with a solution, but I believe this would be a bad idea. I do think some people will be using IS_UNICODE strings when unicode_semantics=off, mainly for existing applications. They may want to serialize Unicode strings even though their classes are IS_STRING. It might make sense to ra

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-09 Thread Andrei Zmievski
The problems you encountered are fairly big, I wouldn't just dismiss them. -Andrei On Sep 9, 2005, at 6:58 AM, Antony Dovgal 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 indicat

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-09 Thread Antony Dovgal
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

Re: [PHP-DEV] unserialize() & unicode issues

2005-09-09 Thread Andrei Zmievski
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 real

[PHP-DEV] unserialize() & unicode issues

2005-09-09 Thread Antony Dovgal
Hello all. I'm currently working on unicode support in serialize()/unserialize() and stuck with some issues. Here they are: 1) What to do with unserializing serialized unicode strings when unicode_semantics is Off? I presume it's safe to create & return IS_UNICODE in this case ? 2) Classnames