[GRASS5] [bug #3591] (grass) d.vect.thematic (and other scripts): LC_NUMERIC setting not used in my Debian

Glynn Clements glynn at gclements.plus.com
Tue Aug 30 18:26:40 EDT 2005


Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=3591
> -------------------------------------------------------------------------
> 
> Subject: d.vect.thematic (and other scripts): LC_NUMERIC setting not
> used in my Debian

GRASS doesn't use any of the locale categories except for LC_MESSAGES
(if it was built using --with-nls).

Making it use LC_NUMERIC would be a lot of work. You can't just
blindly call setlocale(LC_NUMERIC, "") on startup as a lot of file
formats have to use a dot (period) as the decimal separator. Instead,
you would have to identify every use of printf("%f") etc and decide
whether or not it should use the locale's numeric conventions.

Also, there are plenty of ambiguous cases, where output is intended to
be both human-readable and machine-readable. This isn't limited to
GRASS; in locales which use a comma as the decimal separator,
programmers often set Windows to use the US locale as, if you use the
correct locale, you can't paste the output from programs into source
code.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list