Has anyone ever seen a program use the Windows OS native locale by default instead of 'C' locale (the program is C++)?
I have a C++ program which, when converting a double into a string, will replace all decimal symbols (which were originally points) with a comma.
I can only reproduce this behavior if I insert the below code into the program
char* cpSettings = std::setlocale(LC_ALL, ""); // use native locale (Spanish), not C
However, the version of this program/software, which is changing point to comma (for decimal symbol) did Not have this line of code in it and therefore should, by default, use a c-locale.
This program only converts points to commas (decimal symbol) when converting double to string on one specific computer.
I assumed this has to do with locale, but even when the locale on the messed up machine is changed back to English (which uses point for decimal), the program will still replace point with comma in a double to string conversion.
Question: I am wondering if anyone has seen this behavior before? Does anyone know what could be causing this behavior?