--- a/arpack.c
+++ b/arpack.c
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
 #include "spooles.h"
@@ -126,6 +127,8 @@
   ITG token;
 #endif
 
+  setlocale(LC_NUMERIC, "C");
+
   irow=*irowp;ener=*enerp;xstate=*xstatep;ipkon=*ipkonp;lakon=*lakonp;
   kon=*konp;ielmat=*ielmatp;ielorien=*ielorienp;
 
--- a/arpackcs.c
+++ b/arpackcs.c
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
 #include "spooles.h"
@@ -139,6 +140,8 @@
 #ifdef SGI
   ITG token;
 #endif
+
+  setlocale(LC_NUMERIC, "C");
   
   irow=*irowp;xstate=*xstatep;ipkon=*ipkonp;lakon=*lakonp;
   kon=*konp;ielmat=*ielmatp;ielorien=*ielorienp;
--- a/cascade.c
+++ b/cascade.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
+#include <locale.h>
 
 #ifdef SPOOLES
 #include <misc.h>
@@ -62,6 +63,8 @@
 
   double coef,*coefmpc=NULL,coefmin;
 
+  setlocale(LC_NUMERIC, "C");
+
   nodempc=*nodempcp;
   coefmpc=*coefmpcp;
     
--- a/checkconvergence.c
+++ b/checkconvergence.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES 
    #include "spooles.h"
@@ -67,6 +68,8 @@
         *fn=NULL,*eenmax=NULL,*fnr=NULL,*fni=NULL,*qfx=NULL,*cdn=NULL,
         *cdnr=NULL,*cdni=NULL,tmp, maxdecay=0.0, r_rel,cetol;
 
+    setlocale(LC_NUMERIC, "C");
+
     /* reset ialeatoric to zero */
 
     *ialeatoric=0;
--- a/checkconvnet.c
+++ b/checkconvnet.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
    #include "spooles.h"
@@ -45,6 +46,8 @@
   double c2t,c2f,c2p,c2a,c1t,c1f,c1p,a2t,a2f,a2p,a2a,a1t,a1f,a1p,qamp=1.,
          df,dc,db,dd,ran,can,rap,ea,cae,ral;
 
+  setlocale(LC_NUMERIC, "C");
+
   i0=ctrl[0];ir=ctrl[1];ip=ctrl[2];ic=ctrl[3];il=ctrl[4];ig=ctrl[5];ia=ctrl[7];
   df=ctrl[10];dc=ctrl[11];db=ctrl[12];dd=ctrl[16];ran=ctrl[18];can=ctrl[19];
   rap=ctrl[22];ea=ctrl[23];cae=ctrl[24];ral=ctrl[25];c1t=ctrl[32];c1f=ctrl[33];
--- a/checkinclength.c
+++ b/checkinclength.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
    #include "spooles.h"
@@ -44,6 +45,8 @@
     ran=ctrl[18];can=ctrl[19];rap=ctrl[22];
     ea=ctrl[23];cae=ctrl[24];ral=ctrl[25];
 
+    setlocale(LC_NUMERIC, "C");
+
     /* check whether the new increment size is not too big */
     
     if(*dtheta>*tmax){
--- a/compfluidfem.c
+++ b/compfluidfem.c
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <pthread.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
 #include "spooles.h"
@@ -135,6 +136,8 @@
     *aubvr=NULL,*coefmodmpc=NULL,*voldini=NULL,*depth=NULL,*vcono=NULL,
     vconmax[7],vmax[7],*v=NULL;
 
+  setlocale(LC_NUMERIC, "C");
+
   nodempc=*nodempcp;ipompc=*ipompcp;ikmpc=*ikmpcp;ilmpc=*ilmpcp;
   coefmpc=*coefmpcp;labmpc=*labmpcp;fmpc=*fmpcp;co=*cop;
   ipkon=*ipkonp;lakon=*lakonp;kon=*konp;ielmat=*ielmatp;
--- a/complexfreq.c
+++ b/complexfreq.c
@@ -18,6 +18,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 void complexfreq(double **cop,ITG *nk,ITG **konp,ITG **ipkonp,char **lakonp,ITG *ne,
@@ -112,6 +113,8 @@
   ITG token;
 #endif
 
+  setlocale(LC_NUMERIC, "C");
+
   pi=4.*atan(1.);
   constant=180./pi;
 
--- a/electromagnetics.c
+++ b/electromagnetics.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
 #include "spooles.h"
@@ -149,6 +150,8 @@
   ITG token;
 #endif
 
+  setlocale(LC_NUMERIC, "C");
+
   num_cpus=0;
   sys_cpus=0;
   
--- a/frd.c
+++ b/frd.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 #define min(a,b) ((a) <= (b) ? (a) : (b))
@@ -88,6 +89,8 @@
 
   double pi,oner,*errn=NULL,*ethn=NULL;
 
+  setlocale(LC_NUMERIC, "C");
+
   strcpy2(fneig,jobnamec,132);
   strcat(fneig,".frd");
 
--- a/frdgeneralvector.c
+++ b/frdgeneralvector.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 void frdgeneralvector(double *v,ITG *iset,ITG *ntrans,char * filabl,
@@ -34,6 +35,8 @@
 
   float fl;
 
+  setlocale(LC_NUMERIC, "C");
+
   if(*iset==0){
     if((*ntrans==0)||(strcmp1(&filabl[5],"G")==0)){
       for(i=0;i<*nkcoords;i++){
--- a/frdheader.c
+++ b/frdheader.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 void frdheader(ITG *icounter,double *oner,double *time,double *pi,
@@ -29,6 +30,8 @@
   char tmp[132],text[132];
 
   ITG i,ncomma;
+
+  setlocale(LC_NUMERIC, "C");
   
   /* icounter counts the number of loadcases in the frd-file 
      kode counts the number of increments in the frd-file */
--- a/frdselect.c
+++ b/frdselect.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 #define min(a,b) ((a) <= (b) ? (a) : (b))
@@ -47,6 +48,8 @@
 
   float fl;
 
+  setlocale(LC_NUMERIC, "C");
+
   if(strcmp1(&output[3],"a")==0) ioutall=1;
   
   if(*iset==0){
--- a/frdvector.c
+++ b/frdvector.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 void frdvector(double *v,ITG *iset,ITG *ntrans,char * filabl,ITG *nkcoords,
@@ -35,6 +36,8 @@
   
   double a[9],db;
 
+  setlocale(LC_NUMERIC, "C");
+
   if(*iset==0){
     if((*ntrans==0)||(strcmp1(&filabl[5],"G")==0)){
       for(i=0;i<*nkcoords;i++){
--- a/nonlingeo.c
+++ b/nonlingeo.c
@@ -19,6 +19,7 @@
 #include <string.h>
 #include <math.h>
 #include <stdlib.h>
+#include <locale.h>
 #include "CalculiX.h"
 #include "mortar.h"
 #ifdef SPOOLES
@@ -251,6 +252,8 @@
     *audd=NULL,*auddtil=NULL,*auddtil2=NULL,*auddinv=NULL,*bhat=NULL,
     *aubdtil=NULL,*aubdtil2=NULL;
 
+  setlocale(LC_NUMERIC, "C");
+
   /* end of declarations for mortar contact */
 
   icol=*icolp;irow=*irowp;co=*cop;vold=*voldp;
--- a/pcgsolver.c
+++ b/pcgsolver.c
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 #define GOOD 0
@@ -74,6 +75,8 @@
   ITG i=0;
   double *Factor=NULL,*r=NULL,*p=NULL,*z=NULL,*C=NULL,*g=NULL,*rho=NULL;
 
+  setlocale(LC_NUMERIC, "C");
+
   /*  reduce row and column indices by 1 (FORTRAN->C)   */
 
   for (i=0; i<neq; i++)	--iz[i];
--- a/printenergy.c
+++ b/printenergy.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
+#include <locale.h>
 #include "CalculiX.h"
 #include "mortar.h"
 
@@ -31,6 +32,8 @@
 
   double denergymax;
 
+  setlocale(LC_NUMERIC, "C");
+
   if(*iexpl>1){
     printf(" actual total time=%e\n\n",*ttime+*theta**tper);
     if(*mortar==-1){
--- a/radflowload.c
+++ b/radflowload.c
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <pthread.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
 #include "spooles.h"
@@ -103,7 +104,9 @@
     cam0p=0.,cam0a=0.,sigma=0.,*adbrad=NULL,*aubrad=NULL,*q=NULL,
     *area=NULL,*pmid=NULL,*e1=NULL,*e2=NULL,*e3=NULL,
     qamt,qamf,qamtold,qamfold,*sfr=NULL,*hfr=NULL,*sba=NULL,*hba=NULL;
-  
+
+  setlocale(LC_NUMERIC, "C");
+
   adview=*adviewp;auview=*auviewp;
 
   qa0=ctrl[20];qau=ctrl[21];ea=ctrl[23];
--- a/randomfieldmain.c
+++ b/randomfieldmain.c
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 #ifdef SPOOLES
 #include "spooles.h"
@@ -77,6 +78,8 @@
     actreliability,*stn=NULL,reliability,corrlen,*acscalar=NULL,
     *add=NULL,*aud=NULL,sigma=0,*rhs=NULL,*vector=NULL,*adbd=NULL,
     *aubd=NULL,*auc=NULL,delta,time=0.;
+
+  setlocale(LC_NUMERIC, "C");
 	         
   reliability=physcon[10];
   corrlen=physcon[11];
--- a/sensitivity_out.c
+++ b/sensitivity_out.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
+#include <locale.h>
 #include "CalculiX.h"
 
 void sensitivity_out(char *jobnamec,double *dgdxglob,ITG *neq,ITG *nobject,
@@ -29,6 +30,8 @@
   ITG i=0,iobject=0;
       
   FILE *f1;
+
+  setlocale(LC_NUMERIC, "C");
            		 
   /* writing the sensitivities in the sen-file for optimizer */
         	
