On Sat, 2 Jun 2007, Henry Vermaak wrote:

> 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).

The original FDCC files are text files, and are described in ISO 14652 standard.

The problem is that they are huge, and that parsing them would be
very time-intensive (not to mention they would use a large part of 
your disk with nothing but comments). So glibc provides a 'compiled' 
or 'compressed' version of these files which loads very quickly. 
The only thing we need to do is to find out how each of the files 
LC_NUMERIC LC_DATE LC_CURRENCY  (and maybe some others) are structured, 
and we're all set...

It's on my TODO list, together with 325673 other items...

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

Too bad, they promised a beautiful weekend ;-)

Michael.

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

Reply via email to