[Gdal-dev] LOCALE dependent segfault in OGR

Markus Neteler neteler at itc.it
Fri Nov 24 12:41:17 EST 2006


On Fri, Nov 24, 2006 at 06:43:35PM +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 have tried to reproduce your problem without success. Also I read your
> message more carefully and have few notes.
> > 1. DE LOCALE:
> > 
> > GRASS 6.3.cvs (eu_laea):~/data/vmap0_europe_shape > v.in.ogr europe_countries_LAEA.shp out=europe_countries --o
> > WARNUNG: Die Vektorkarte 'europe_countries' existiert bereits und wird
> >          überschrieben.
> The message above is localized, so the process printing that message
> calls setlocale() function.
> > A datum name etrs89 (European_Terrestrial_Reference_System_1989) was specified without transformation parameters.
> > Note that the GRASS default for etrs89 is towgs84=0.000,0.000,0.000.
> These messages are not localized, so the process which prints them
> either does not call setlocale() or these messages just do not
> translated. It looks like the former is right, because numbers in
> towgs84 list are dot delimited. In De locale they should be comma
> delimited.

In GRASS, we are in a transition of changing all relevant fprintf(stdXXX,"...")
to G_message(_("...")) with gettext macro. In the case of the
datum message it's still the old fprintf() without macro.
> > Die Projektionsinformationen des Eingabedatensatzes und der aktuellen Location stimmen überein.
> > Fahre mit dem Import fort...
> > WARNUNG: Die Vektorkarte 'europe_countries' existiert bereits und wird
> >          überschrieben.
> > Layer: europe_countries_LAEA
> > WARNUNG: Spaltenname 'cat' wurde in 'cat_' geändert.
> > Importiere 3356 Objekte der Karte...
> > Speicherzugriffsfehler
> This is localized again.


> Actually I do not understand why you have a mix of localized and
> non-localized processes here.

Sorry for that confusion. It is because we are only half through
with changing all messages to gettext macros. Since GRASS is
huge this is a long lasting task.

> My own GRASS build (6.3cvs) does not
> localized at all, I have EN messages in any locale (probably I should
> build GRASS with some option enabled?).

Yes, you need to 'make distclean' and 
 ./configure --with-nls ...
to activate the language support.

Best regards,

More information about the Gdal-dev mailing list