From b846b0b15d5889edb176dd12427cd329e4736351 Mon Sep 17 00:00:00 2001 From: johan Date: Tue, 28 Jan 2014 00:39:04 +0100 Subject: [PATCH] Set C locale at startup Former-commit-id: 2f47a595266e5b865aa70a65bbc8d29c0c515eed --- deploy/hyperion.tar.gz.REMOVED.git-id | 2 +- src/hyperion-remote/hyperion-remote.cpp | 3 +++ src/hyperion-v4l2/hyperion-v4l2.cpp | 4 +++- src/hyperiond/hyperiond.cpp | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/deploy/hyperion.tar.gz.REMOVED.git-id b/deploy/hyperion.tar.gz.REMOVED.git-id index 362f60df..a43060fd 100644 --- a/deploy/hyperion.tar.gz.REMOVED.git-id +++ b/deploy/hyperion.tar.gz.REMOVED.git-id @@ -1 +1 @@ -08d42deff1de4c4296e4c6e22c783a0096ed3396 \ No newline at end of file +e1b870c27b4cf133a895ed91f825c3c6f6f69e58 \ No newline at end of file diff --git a/src/hyperion-remote/hyperion-remote.cpp b/src/hyperion-remote/hyperion-remote.cpp index f7dfffe6..f09f90e1 100644 --- a/src/hyperion-remote/hyperion-remote.cpp +++ b/src/hyperion-remote/hyperion-remote.cpp @@ -1,4 +1,5 @@ // stl includes +#include #include // Qt includes @@ -26,6 +27,8 @@ int count(std::initializer_list values) int main(int argc, char * argv[]) { + setlocale(LC_ALL, "C"); + QCoreApplication app(argc, argv); try diff --git a/src/hyperion-v4l2/hyperion-v4l2.cpp b/src/hyperion-v4l2/hyperion-v4l2.cpp index a4464eb9..b6bfda4a 100644 --- a/src/hyperion-v4l2/hyperion-v4l2.cpp +++ b/src/hyperion-v4l2/hyperion-v4l2.cpp @@ -1,7 +1,7 @@ - // STL includes #include #include +#include // QT includes #include @@ -30,6 +30,8 @@ void saveScreenshot(void *, const Image & image) int main(int argc, char** argv) { + setlocale(LC_ALL, "C"); + try { // create the option parser and initialize all parameters diff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp index 7232675a..7aadc94d 100644 --- a/src/hyperiond/hyperiond.cpp +++ b/src/hyperiond/hyperiond.cpp @@ -1,6 +1,7 @@ // C++ includes #include #include +#include // QT includes #include @@ -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);