[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setlocale ?
From: |
Søren Hauberg |
Subject: |
Re: setlocale ? |
Date: |
Wed, 05 Oct 2011 20:00:48 +0200 |
ons, 05 10 2011 kl. 09:51 -0700, skrev CdeMills:
> Hello,
>
> while trying to understand why a data file was not read correctly, I quiclky
> found the culprit: it used french locales, with decimal separator set to ','
> instead of '.'
>
> To make libc functions like scanf et al. locale aware, the function
> "setlocale" must be called. By default, it uses the locale value from the
> environment variables LANG/LC_NUMERIC/LC_ALL
>
> I quickly greped into the sources, and found only one call to 'setlocale' in
> the source DLD-FUNCTIONS/__magick_read__.cc
> which is intended to read images with ImageMagick.
>
> Would it be possible to either
> - place a call to setlocale (LC_ALL, ""); at Octave startup
> - implement a setlocale into the interpreter as an interface to the libc
> setlocale
> in order to use the locales from the environment and make internal functions
> all at once aware of locales conventions ?
Some time ago I reported the same issue and made the change at
http://hg.savannah.gnu.org/hgweb/octave/rev/d27bd2f74137
Was this somehow reverted or something like that?
Søren
Re: setlocale ?,
Søren Hauberg <=