[Gdal-dev] LOCALE dependent segfault in OGR

Markus Neteler neteler at itc.it
Thu Nov 23 15:49:32 EST 2006


Andrey,

On Thu, Nov 23, 2006 at 02:01:50PM +0300, Andrey Kiselev wrote:
> On Wed, Nov 22, 2006 at 04:54:54PM +0100, Markus Neteler wrote:
> > after a new installation of Mandriva 2007 I found some fancy bug (or
> > whatever), apparently related to the LOCALE:
> 
> Markus,
> 
> I think it is related to decimal point problem. It seems that De locale
> uses comma as a decimal delimiter:

yes, that's right.
 
> $ LC_NUMERIC=de_DE locale -k LC_NUMERIC
> decimal_point=","
> thousands_sep="."
> grouping=3;3
> numeric-decimal-point-wc=44
> numeric-thousands-sep-wc=46
> numeric-codeset="ISO-8859-1"
> 
> There are many atof() calls spreaded around in OGR core and in drivers
> and I am a bit hesitant to convert all of them to CPLAtof() which is
> locale independent. Could you upload your shape file somewhere?

Sure:
http://mpa.itc.it/markus/tmp/ogr/

> Probably
> it will be enough to change atof() in the shape driver only. Also it is
> starnge thar OGR is not resistant to this kind of problem, probably we
> have different isssue here.

The strange part is that I am using the DE locale for years on my
laptop. Only, after the recent new installation (disk change) I have
found this problem.

It seems to stumble over this "delete this" lines (whatever they do).

Best regards,
Markus




More information about the Gdal-dev mailing list