From cef2cf285232b11e9f64ccc3ad25074f712aecde Mon Sep 17 00:00:00 2001 From: StevenPuttemans Date: Fri, 6 Mar 2015 12:59:26 +0100 Subject: [PATCH] fixing locale settings - making it universal --- modules/highgui/src/window_QT.cpp | 1 + modules/highgui/src/window_carbon.cpp | 1 + modules/highgui/src/window_cocoa.mm | 2 ++ modules/highgui/src/window_w32.cpp | 2 ++ 4 files changed, 6 insertions(+) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 7f37e143a..c89918ee2 100644 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -464,6 +464,7 @@ static int icvInitSystem(int* c, char** v) if (!QApplication::instance()) { new QApplication(*c, v); + setlocale(LC_NUMERIC,"C"); qDebug() << "init done"; diff --git a/modules/highgui/src/window_carbon.cpp b/modules/highgui/src/window_carbon.cpp index 93d9e4f7a..bbc600785 100644 --- a/modules/highgui/src/window_carbon.cpp +++ b/modules/highgui/src/window_carbon.cpp @@ -146,6 +146,7 @@ CV_IMPL int cvInitSystem( int argc, char** argv ) } wasInitialized = 1; } + setlocale(LC_NUMERIC,"C"); return 0; } diff --git a/modules/highgui/src/window_cocoa.mm b/modules/highgui/src/window_cocoa.mm index 414ed6475..b9efe35bb 100644 --- a/modules/highgui/src/window_cocoa.mm +++ b/modules/highgui/src/window_cocoa.mm @@ -156,6 +156,8 @@ CV_IMPL int cvInitSystem( int , char** ) //[application finishLaunching]; //atexit(icvCocoaCleanup); + setlocale(LC_NUMERIC,"C"); + return 0; } diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 0878bff60..29b1e41ed 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -260,6 +260,8 @@ CV_IMPL int cvInitSystem( int, char** ) wasInitialized = 1; } + setlocale(LC_NUMERIC,"C"); + return 0; }