Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit 2f47a59

Browse files
committed
Set C locale at startup
1 parent f45b842 commit 2f47a59

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

deploy/hyperion.tar.gz

349 Bytes
Binary file not shown.

src/hyperion-remote/hyperion-remote.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// stl includes
2+
#include <clocale>
23
#include <initializer_list>
34

45
// Qt includes
@@ -26,6 +27,8 @@ int count(std::initializer_list<bool> values)
2627

2728
int main(int argc, char * argv[])
2829
{
30+
setlocale(LC_ALL, "C");
31+
2932
QCoreApplication app(argc, argv);
3033

3134
try

src/hyperion-v4l2/hyperion-v4l2.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
// STL includes
32
#include <csignal>
43
#include <iomanip>
4+
#include <clocale>
55

66
// QT includes
77
#include <QImage>
@@ -30,6 +30,8 @@ void saveScreenshot(void *, const Image<ColorRgb> & image)
3030

3131
int main(int argc, char** argv)
3232
{
33+
setlocale(LC_ALL, "C");
34+
3335
try
3436
{
3537
// create the option parser and initialize all parameters

src/hyperiond/hyperiond.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// C++ includes
22
#include <cassert>
33
#include <csignal>
4+
#include <clocale>
45

56
// QT includes
67
#include <QCoreApplication>
@@ -70,6 +71,7 @@ Json::Value loadConfig(const std::string & configFile)
7071
int main(int argc, char** argv)
7172
{
7273
std::cout << "Application build time: " << __DATE__ << " " << __TIME__ << std::endl;
74+
std::cout << "Locale = " << setlocale(LC_ALL, "C") << std::endl;
7375

7476
// Initialising QCoreApplication
7577
QCoreApplication app(argc, argv);

0 commit comments

Comments
 (0)