Proposing to call setlocale( LC_ALL, "C" ) in msSetup()
dmorissette at MAPGEARS.COM
Thu Apr 27 13:27:29 EDT 2006
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
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.
Szekeres Tamás wrote:
> 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.
> Digitális képből papírkép már 25 Ft-tól! Ingyenes budapesti házhozszállítás! >>>
More information about the mapserver-dev