[fpc-devel] Unicode and UTF8String

Marco van de Voort marcov at stack.nl
Mon Dec 1 21:07:50 CET 2008


In our previous episode, Felipe Monteiro de Carvalho said:
> > You did nail a big problem though, and a weakness in Delphi's design.
> > What to do with classes that are used both straight and in the GUI?
> 
> You mean like TStrings?
> 
> I think we will eventually roll our own TUTF8Strings
> 
> We could add a unit in FPC for all kinds of UTF-8 versions of routines.

Doesn't work per se. Tstringlist is also used in libraries, to save GUI
parts etc.

A better solution would be to simply not try to fix this and give lazarus their
own copy of said classes, so that they can keep the encoding of that in sync
with whatever they decide for their own encoding.

That would actually require less fixups (a few conversions procedures for
the rare points where tlclstrings are passed to e.g. registry units. Lazarus
already has their own XML units). 



More information about the fpc-devel mailing list