Proposing to call setlocale( LC_ALL, "C" ) in msSetup()
Szekeres Tamás
szekeres.tamas at FREEMAIL.HU
Thu Apr 27 16:51:46 EDT 2006
I have added
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1762
for this problem
and we have also a C# specific bug
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1758
in connection with it.
I would suggest to enable/disable this feature by a compile switch.
Tamas
-----Original Message-----
From: UMN MapServer Developers List [mailto:MAPSERVER-DEV at LISTS.UMN.EDU] On
Behalf Of Daniel Morissette
Sent: Thursday, April 27, 2006 7:27 PM
To: MAPSERVER-DEV at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-DEV] Proposing to call setlocale( LC_ALL, "C" )
in msSetup()
I think we'll need a bug report to document the change and the reasons
behind it (perhaps a copy of the thread where this was discussed with
Frank).
Also, is it worth saving the original locale value in msSetup() and
restoring it in msCleanup()? I realize that in most cases this won't be
of any use, but I thought I would bring up the idea anyway.
Finally, a note about this should probably be added to the MapScript
docs (SWIG and PHP docs) since this can potentially cause side-effects
in scripting environments. I can take care of the PHP docs once the
change is done.
Daniel
Szekeres Tamás wrote:
> Developers,
>
> I had a problem with that mapserver/mapscript is working
> under the locale context of the host process, but the code
> is not ready to operate in all locales so far. For example
> the lexer expects dot as the decimal separator and some of
> the locales use comma and atof will truncate the numbers to
> the integer part causing mystical errors.
>
> As a quick fix I suggest to call setlocale to the default
> "C" at the msSetup initialization function.
>
> The best solution would rewriting the code to be locale
> independent if it is expected.
>
> Because we can have some side effects with this change I am
> calling a vote on it.
>
>
> Tamas
>
>
>
____________________________________________________________________________
___
> Digitális képből papírkép már 25 Ft-tól! Ingyenes budapesti
házhozszállítás! >>>
> http://www.xlab.hu/index.php?zoneid=levelvegi
>
>
>
--
Daniel Morissette
http://www.mapgears.com/
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 2006.04.27.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 2006.04.27.
More information about the mapserver-dev
mailing list