Re: Removal of unicode_semantics

From: Date: Wed, 07 May 2008 16:53:22 +0000
Subject: Re: Removal of unicode_semantics
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-37519@lists.php.net to get a copy of this message
Precisely. Stefan Walk wrote:
Lester Caine schrieb:
That sounds like just the sort of edge case that Derick is suggesting needs logging for fixing up. unicode_semantics=on is just another bodge to to make it happen rather than a solution. I think I understand your description, and to my eyes it looks like a unicode bug that needs addressing?
No, it's a misunderstanding of how things work that has been explained to Tomas countless times. A unicode string consists of codepoints, not of bytes. Having \xXX and \XXX insert bytes instead of codepoints does not make sense, because a) That would require a defined unicode encoding to be used, and even if that is the case b) would allow you to insert broken data into the unicode string, so it's not a unicode string anymore, which is a no-no. If you want to do that sort of fiddling with binary details, use binary strings, not unicode strings. Regards, Stefan


« previous php.internals (#37519) next »