From d965dd8953d37a41ab8958a3ff05d0d9aa14c09f Mon Sep 17 00:00:00 2001
From: scuri
IMPORTANT: because the SVG specification states that floating point number must use dots "." for floating point separators, we set -the numeric locale to "English" when the canvas is created, and restore it when +the numeric locale to "C" when the canvas is created, and restore it when it is destroyed. But since it uses the global C function setlocale if you use other C functions that are locale dependent while the SVG canvas is being used then be aware that they will be affected.
diff --git a/mak.vc9/cdsimple.vcproj b/mak.vc9/cdsimple.vcproj index 7115e88..3753bd5 100644 --- a/mak.vc9/cdsimple.vcproj +++ b/mak.vc9/cdsimple.vcproj @@ -44,7 +44,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\include,..\..\iup\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;__CD__;simple;_CRT_SECURE_NO_DEPRECATE;USE_CONTEXTPLUS;USE_OPENGL;CD_NO_OLD_INTERFACE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;__CD__;simple;_CRT_SECURE_NO_DEPRECATE;USE_CONTEXTPLUS;CD_NO_OLD_INTERFACE" BasicRuntimeChecks="3" RuntimeLibrary="1" PrecompiledHeaderFile=".\..\obj\cdsimple/cdsimple.pch" diff --git a/src/svg/cdsvg.c b/src/svg/cdsvg.c index 46e41bf..b84fb48 100644 --- a/src/svg/cdsvg.c +++ b/src/svg/cdsvg.c @@ -1244,7 +1244,7 @@ static void cdcreatecanvas(cdCanvas *canvas, void *data) /* SVN specification states that number must use dot as decimal separator */ ctxcanvas->old_locale = cdStrDup(setlocale(LC_NUMERIC, NULL)); - setlocale(LC_NUMERIC, "English"); + setlocale(LC_NUMERIC, "C"); ctxcanvas->file = fopen(filename, "w"); if (!ctxcanvas->file) -- cgit v1.2.3