[fpc-pascal] locale solution for unix systems

Henry Vermaak henry.vermaak at gmail.com
Fri Mar 20 11:58:24 CET 2009


2009/3/20 Marco van de Voort <marcov at stack.nl>:
> In our previous episode, Henry Vermaak said:
>> > Personally I don't see the use of going this way. Why not simply use iconv?
>>
>> but that's just for char set conversion, how would we get the locale
>> data (like time/date format, etc)?  i guess we have no choice but to
>> parse the definition files, then.
>
> Correct, it is apparantly libc itself, not iconv, but the point is if
> clocale can, why not abstract it that way.
>
> 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.

henry



More information about the fpc-pascal mailing list