[fpc-devel] Locale solution for Linux (and maybe *nix)

Michael Van Canneyt michael at freepascal.org
Mon Aug 4 11:05:19 CEST 2008



On Mon, 4 Aug 2008, Marco van de Voort wrote:

> > On Mon, 4 Aug 2008, Marco van de Voort wrote:
> > 
> > > > it at once in the sysutils unit :-)
> > > 
> > > Why that? What is the problem with clocale?
> > 
> > The Libc dependency. Sysutils is used in a lot of small programs which
> > do not necessarily depend on Libc. Having a locale available for these
> > without pulling in libc would be a big plus in my eyes.
> 
> It will inflate the size, but worse it will make these little applications
> vulnerable for bugs in the reading of these files, even if they don't use
> the locale info. These kind of things are simply more sensitive on *nix.
> 
> But since we know the libc interface is also not always stable, it might be
> good to have a choice. But please if you do implement this, keep it plugin
> style to keep choice, and avoid adding a dangerous dependancy to programs
> that don't use it.

Like I said in the paragraph below: or as a plugin unit :-)

>  
> > If we can have a routine that parses the locale file, we can add it to
> > sysutils or as a plugin unit, whatever. To have separate widestring
> > managers and thread managers would also be a good thing (tm).
> 
> Yes, in time we'll need an own implementation of a (limited) widestring
> manager. Actually the unit charset already is a bit of a core for this (it
> converts codepages over unicode to other codepages).

I know. 
I have a framework for a 'fprecode' style unit ready, for use e.g. in TDataset.

Michael.



More information about the fpc-devel mailing list