Re: Simpler Unicode solution for PHP6
| From: | Ángel González | Date: | Thu, 20 Feb 2014 20:37:14 +0000 |
| Subject: | Re: Simpler Unicode solution for PHP6 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72719@lists.php.net to get a copy of this message | ||
On 20/02/14 17:23, Pierre Joye wrote:
Hi, On Feb 20, 2014 11:17 PM, "Andrea Faulds"<ajf@ajf.me> wrote:Create a macro for checking if it's of type IS_STRING_RAW or IS_STRING_UTF8, and replace with it the hundreds of IS_STRING comparisons (it would affect many lines, but not hard).Hi, As a simpler to implement approach to Unicode, could we perhaps supportit just by adding an “is UTF-8” flag to strings internally? Then unmodified functions would just see a normal string and handle it like they do any other, and modified and new Unicode-aware functions would test for the presence of the flag and handle the string appropriately in that case.Thoughts?That could be an option during the development phase. However I do not like the idea of a flag for the final implementation, it creates more troubles from an application point of view. Optimizing space? The flag could be embedded with the type.