[fpc-devel] Unicode in the RTL (my ideas)

Marco van de Voort marcov at stack.nl
Wed Aug 22 08:59:21 CEST 2012


In our previous episode, Ivanko B said:
> > Do you mean replacing a character in an UCS-2/UCS-4 string can be
> > implemented more efficiently than in an UTF-8/UTF-16 string?
> >
> 
> Sure, just scan the string char by char as array elements and replace
> as matches encounter. Like working with integer arrays.

The scanning is not what is expensive. The change of the match is.

In both cases you need to reconstruct at least a 32-bit codepoint and match
that against other codepoints in some datastructure.



More information about the fpc-devel mailing list