From cab095e11e618e2bb9a62538a080518946bafd4a Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Wed, 11 May 2016 12:51:32 -0600 Subject: [PATCH] cmake-gui: Always use "C" locale for numbers (#16099) Set LC_NUMERIC = "C" at startup after Qt initializes the application because Qt may have adopted the current locale from the environment. CMake does not define behavior for non-C-locale numeric behavior. --- Source/QtDialog/CMakeSetup.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index b78a5df8b..1e1f04082 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -94,6 +94,8 @@ int main(int argc, char** argv) QApplication app(argc, argv); + setlocale(LC_NUMERIC, "C"); + #if defined(CMAKE_ENCODING_UTF8) QTextCodec* utf8_codec = QTextCodec::codecForName("UTF-8"); QTextCodec::setCodecForLocale(utf8_codec);