[fpc-pascal] locale solution for unix systems

Henry Vermaak henry.vermaak at gmail.com
Fri Mar 20 12:17:47 CET 2009

2009/3/20 Marco van de Voort <marcov at stack.nl>:
> In our previous episode, Henry Vermaak said:
>> > Because the textmode versions might not be installed on all systems, the
>> > compiled versions might be OS specific, and if they ever change for linux
>> > distributions you have another problem at your hand.
>> >
>> > And IMHO it is not crucial enough to try to bypass libc.
>> i agree.  my opinion has always been that since it's a libc invention
>> in the first place , libc will always be available on systems with
>> this locale information, so it's a lot easier just linking to libc and
>> using nl_langinfo to set up the global variables in fpc.
> That's what clocale already does. Note that the way how this happens is not
> straight forward, since the exact interpretation of what libc returns and
> which fields are filled differ. See clocale.

i know, i've seen it before.

> So please start with inventorizing what clocale doesn't do, and see if this
> can be amended some other way before embarking on great adventures into the
> unknown, because those are never _that_ simple. Specially when done
> multiplatform and then maintained over time (hence: multiversion).

i think you misunderstand me, i've looked at this thing ages ago and
come to the same conclusion.  i'm just trying to convince the people
that scream "dependency" that it's not worth going through the effort.
 it would really be reinventing _someone else's_ wheel.


More information about the fpc-pascal mailing list