Set C locale at startup

Former-commit-id: 2f47a595266e5b865aa70a65bbc8d29c0c515eed
This commit is contained in:
johan 2014-01-28 00:39:04 +01:00
parent 2085e3909f
commit b846b0b15d
4 changed files with 9 additions and 2 deletions

View File

@ -1 +1 @@
08d42deff1de4c4296e4c6e22c783a0096ed3396
e1b870c27b4cf133a895ed91f825c3c6f6f69e58

View File

@ -1,4 +1,5 @@
// stl includes
#include <clocale>
#include <initializer_list>
// Qt includes
@ -26,6 +27,8 @@ int count(std::initializer_list<bool> values)
int main(int argc, char * argv[])
{
setlocale(LC_ALL, "C");
QCoreApplication app(argc, argv);
try

View File

@ -1,7 +1,7 @@
// STL includes
#include <csignal>
#include <iomanip>
#include <clocale>
// QT includes
#include <QImage>
@ -30,6 +30,8 @@ void saveScreenshot(void *, const Image<ColorRgb> & image)
int main(int argc, char** argv)
{
setlocale(LC_ALL, "C");
try
{
// create the option parser and initialize all parameters

View File

@ -1,6 +1,7 @@
// C++ includes
#include <cassert>
#include <csignal>
#include <clocale>
// QT includes
#include <QCoreApplication>
@ -70,6 +71,7 @@ Json::Value loadConfig(const std::string & configFile)
int main(int argc, char** argv)
{
std::cout << "Application build time: " << __DATE__ << " " << __TIME__ << std::endl;
std::cout << "Locale = " << setlocale(LC_ALL, "C") << std::endl;
// Initialising QCoreApplication
QCoreApplication app(argc, argv);