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

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Aug 4 10:40:46 CEST 2008


On Mon, Aug 4, 2008 at 10:32 AM, Marco van de Voort <marcov at stack.nl> wrote:
>> On Mon, 4 Aug 2008, Graeme Geldenhuys wrote:
>>
>> So, if you can write a parser for these files, please do, and I'll integrate
>> it at once in the sysutils unit :-)
>
> Why that? What is the problem with clocale?


Old email from Michael regarding this....
Dependency on libc is not allowed in the sysutils.


---------- Forwarded message ----------
From: Michael Van Canneyt <michael@****.org>
Date: Mon, Mar 10, 2008 at 3:33 PM
Subject: Re: [fpc-devel] Date and Time formatting via locale settings
doesn't work under FPC 2.2.0
To: FPC developers' list <fpc-devel at lists.freepascal.org>


On Mon, 10 Mar 2008, Graeme Geldenhuys wrote:

> We got the exact same output on all three PC's tested. So basically
> the locale/region information is totally ignored!  Is the date format
> hard-coded under Linux or is there something vital that we are missing
> under Linux?

The locale/region information is ignored by default. I have a unit
that loads this
information using Libc or the KDE settings, but it is not an option to
have this in sysutils by default, since it introduces a dependency on
Libc.

The section on 'Localization support' in the sysutils documentation mentions
that:

Localization support depends on various constants and structures being
initialized correctly. On Windows and OS/2 this is done automatically: a
widestring manager is installed by default which helps taking care of the
current locale when performing various operations on strings. The various
internationalization settings (date/time format, currency, language etc) are
also initialized correctly on these platforms.


Michael.
------------------------[  end   ]---------------------------




Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list