[fpc-devel] RTL and Unicode filenames operations.

Marco van de Voort marcov at stack.nl
Mon Feb 1 10:27:34 CET 2010


In our previous episode, Michael Schnell said:
> > D2009/d2010 are still windows only.
> >   
> Do you think there is any general problem in using D2009 strings with
> dynamic encoding with Unix ? On the first view I don't see one.

In general I prefer to use each platform using its native encoding. 

Some commercial unices are also using utf-16 afaik, since they haven't
switched their TTY to UTF-8 yet. To be investigated.

I lean towards RTLString=utf8string; and RTLString=unicodestring on the
respective platforms, and then express the RTL in RTLString.

Since both types can be passed to another for the most, aside for a few VAR
functions this is transparent, and leaves the decision to the user what his
main string type is, and how many conversions he wants to allow or avoid.

Moreover, it allows for passing UTF-8 strings to system functions on
freebsd/linux in the base system (which could be benificial for the smaller
utils and the compiler itself), since then just passing it on does not
require cwstring

We are not Codegear, for which everything but Windows is an afterthought.



More information about the fpc-devel mailing list