summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.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/cmakemain.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/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 77f1e4e..9f9f6bb 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -25,6 +25,7 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include <cmsys/Encoding.hxx>
+#include <locale.h>
#ifdef CMAKE_BUILD_WITH_CMAKE
//----------------------------------------------------------------------------
@@ -162,6 +163,7 @@ static void cmakemainProgressCallback(const char *m, float prog,
int main(int ac, char const* const* av)
{
+ setlocale(LC_ALL, "");
cmsys::Encoding::CommandLineArguments args =
cmsys::Encoding::CommandLineArguments::Main(ac, av);
ac = args.argc();