From 34103ef1cb466fea73fbd70ec4676796d6d302f0 Mon Sep 17 00:00:00 2001 From: StevenPuttemans Date: Tue, 5 Aug 2014 16:05:10 +0200 Subject: [PATCH] fixing setting the locale back to what should be expected fix should be applyed for every window interface and generation --- 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 | 1 + 4 files changed, 5 insertions(+) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 64ebf0870..1a3830319 100644 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -447,6 +447,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 3d092e736..e44093512 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 433e437a7..74f6c0554 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 b5cbc5565..fb5b6b5e4 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -250,6 +250,7 @@ CV_IMPL int cvInitSystem( int, char** ) wasInitialized = 1; } + setlocale(LC_NUMERIC,"C"); return 0; }