summaryrefslogtreecommitdiffstats
path: root/Source/ctest.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-05-31 03:41:48 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2014-06-04 00:22:25 (GMT)
commit730e386291cb7aad8f532125216b2ec71d710748 (patch)
treefba5ac405d3746f89980bf54e668147497196ce9 /Source/ctest.cxx
parentc4a26b70cbaa1708b3ad28f2d09976fd7b1c925e (diff)
downloadCMake-730e386291cb7aad8f532125216b2ec71d710748.zip
CMake-730e386291cb7aad8f532125216b2ec71d710748.tar.gz
CMake-730e386291cb7aad8f532125216b2ec71d710748.tar.bz2
Encoding: Add setlocale() to applications.
See also bug #14934 where chinese characters could not be used with cpack.
Diffstat (limited to 'Source/ctest.cxx')
-rw-r--r--Source/ctest.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 3eb5551..0848f19 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -19,6 +19,7 @@
#include "CTest/cmCTestScriptHandler.h"
#include "CTest/cmCTestLaunch.h"
#include "cmsys/Encoding.hxx"
+#include <locale.h>
//----------------------------------------------------------------------------
static const char * cmDocumentationName[][2] =
@@ -114,6 +115,8 @@ static const char * cmDocumentationOptions[][2] =
// this is a test driver program for cmCTest.
int main (int argc, char const* const* argv)
{
+ setlocale(LC_ALL, "");
+
cmsys::Encoding::CommandLineArguments encoding_args =
cmsys::Encoding::CommandLineArguments::Main(argc, argv);
argc = encoding_args.argc();