[fdo-users] Re : Re : Re : weird issue
badreddine.karoui at autodesk.com
Fri Mar 9 09:42:01 EST 2007
The issue related to float/string conversion is found in few places in the FDO and possibly MapGuide Open source. MapGuide server enforces setting the LC_NUMERIC to C. That will be true for at least the next milestone(1.2). There are some changes for other locale related issues addressed by this RFC: http://trac.osgeo.org/mapguide/wiki/MapGuideRfc18
The immediate solution to this issue would be to follow MapGuide Open source solution and to set the LC_NEMERIC to "C". That should be set once for the whole process and usually is done in the main function. In the case of MapGuide server, it's already done for you.
I'm aware that this solution will affect locale sensitive number formatting of your application. If that's the case, then you need to decide to either localize the LC_NUMERIC setting for your application or in the SHP provider as you indicated in your workaround. Re-setting the LC_NUMERIC may have some performance impact that you need to assess for your case and solution.
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Ytse
Sent: Friday, March 09, 2007 9:34 AM
To: fdo-users at lists.osgeo.org; Ytse
Subject: [fdo-users] Re : Re : Re : weird issue
that would be enough for the GetData() method but I would have to rewrite the SetData() so that it doesn't use sprintf.
- GDAL1.3 released in FDO 3.2 ThirdParty doesn't contain cpl_strtod.cpp
- why use GDAL for that when we can simply set the locale to default (C language behavior) for the numeric values ?
my questions may sound (or even be :) stupid but please be indulgent as I'm no C++ programer
The ESRI Shapefile doesn't say anything about handling data in with
locale-awareness or not.
In GDAL, there is locale independent function - CPLAtof - used in such
It should be enough to replace atof() with CPLAtof() call in FDO
provider for Shapefile.
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
fdo-users mailing list
fdo-users at lists.osgeo.org
More information about the fdo-users