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?
—
Andrea Faulds
http://ajf.me/
Hi,
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.
The main problem remains tho' (see the other threads). If we do not manage
to solve it within the next months, we can delay 6 for another year or two.
Cheers,
Pierre
Hi,
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).