On 02/06/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:

Hello,

This is a known problem. The problem is that the variables which control
the date/time/currency formatting in the SysUtils unit are not initialized
on Unix. This is an open issue which must still be resolved. (it takes some
work to do this, unfortunately)

i looked into this some time ago.  the function you really want to
emulate is nl_langinfo and (as far as i could understand) it parses
all the locale files to populate big records with the correct
information.  these locale files are a libc invention to start with
(so the format might change, but unlikely) and they are not text
files!  so you have to look at ulrich drepper's code on what the data
structures look like and how to parse them (which are mostly macros,
by the way).

sorry for my hand-wavy description, but i didn't have enough time to
go into this at the time.  i keep telling myself there must be an
easier way and i wonder why those files aren't simply text files (like
everything else on linux).

maybe i'll get a rainy day to look into this again.


I have a unit which does this for you. It checks the KDE international
settings or the C library settings. It is not included by default in SysUtils
because it creates a dependency on the C library, but I can send this
unit to you in private.

Michael.


henry

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to