Re: Simpler Unicode solution for PHP6
On 20/02/14 17:23, Pierre Joye wrote:
Hi,
On Feb 20, 2014 11:17 PM, "Andrea Faulds"<
[email protected]> wrote:
Hi,
As a simpler to implement approach to Unicode, could we perhaps support
it 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.
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).
Thread (3 messages)