S
Stephane_44
Guest
The C++ application we developp doesnt contain any call to setlocale function.
So when the function CString::Format is called like this :
CString val;
val.Format("%.2lf",10.24);
the expected value for val is "10.24" (even if comma is specified for decimal separator in international settings - which is most of the case in France). It is the default behaviour of the C++ library.
On some very rare configurations (XP, Vista, Seven, 8) the return value is "10,24" (comma instead of point) as if setlocale has been previously called like this : setlocale(LC_ALL,""); (if we put this code in our application the result is alway with comma -as international settings comma is set for decimal separator- but it is not what we want)
How can this happens ? Is it possible that a DLL, automatically linked by our application, calling setlocale(LC_ALL,""), can make out application running as if setlocale(LC_ALL,"") is called inside our own application ?
Thank you for reading (and answering !).
Regards
Continue reading...
So when the function CString::Format is called like this :
CString val;
val.Format("%.2lf",10.24);
the expected value for val is "10.24" (even if comma is specified for decimal separator in international settings - which is most of the case in France). It is the default behaviour of the C++ library.
On some very rare configurations (XP, Vista, Seven, 8) the return value is "10,24" (comma instead of point) as if setlocale has been previously called like this : setlocale(LC_ALL,""); (if we put this code in our application the result is alway with comma -as international settings comma is set for decimal separator- but it is not what we want)
How can this happens ? Is it possible that a DLL, automatically linked by our application, calling setlocale(LC_ALL,""), can make out application running as if setlocale(LC_ALL,"") is called inside our own application ?
Thank you for reading (and answering !).
Regards
Continue reading...