[fpc-devel] Unicode RTL

Marco van de Voort marcov at stack.nl
Wed Nov 16 12:33:18 CET 2005


> > allowing to reuse the OS independant code. 
> > 
> > However this doesn't work fully this way, since unicode internally also hits
> > OS-independant code hard. IOW the separate target only solves the windows
> > unit defaults.
> 
> Indeed. What is proposed is that the system independent RTL uses an 
> abstract string type (Tnativestring) which is widestring or ansistring 
> depending on target.

That only solves the typing. Not the duplication of all string code in the
RTL. (accessing strings with [] e.g.), unless you choose a fixed width
character encoding and semantics that are 100% ansistring compatible. 

> What should be done on Linux/FreeBSD/MacOS is still unknown to me, it is a
> wild west, but likely something similar, internally a widestring rtl is
> used that converts to the right encoding when communicating externally.

Problem is that this is a costly system that decreases string performance
significantly. Moreover I don't like solutions that don't tackle all
platforms at once, since that means the other platforms might be pushed into
an unsuitable model when they start implementing.




More information about the fpc-devel mailing list