[fpc-devel] Unicode and UTF8String

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Dec 1 21:22:08 CET 2008


On Mon, 1 Dec 2008 21:07:50 +0100 (CET)
marcov at stack.nl (Marco van de Voort) wrote:

> 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). 

Only at places where we had the choice. The LCL uses the FCL xml units.

Compatibility was always the bigger goal for lazarus. IMHO a TLCLStrings
breaks more than it would solve.

Mattias



More information about the fpc-devel mailing list