Re: unserialize() & unicode issues
| From: | Derick Rethans | Date: | Tue, 13 Sep 2005 09:52:00 +0000 |
| Subject: | Re: unserialize() & unicode issues | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18815@lists.php.net to get a copy of this message | ||
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 find its class entry in the
> > AD> list.
> > I think, it's not the only way.
> > If we don't care about being compatible with previous PHP's
> > serialize(), a more portable way is to store class/property names in
> > unicode (if unicode_semantics=off when serializing, convert hash keys to
> > unicode). Since we do know script encoding, we can always downgrade
> > unicoded names into local encoding.
>
> So you propose to store strings/hash keys/class names in Unicode even if
> unicode_semantics is Off ?
> It looks like adding unnecessary overhead to me.
But needed, as even with the semantics off, you can get unicode strings.
Which can end up as array keys.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org