diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2014-05-31 03:41:48 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2014-06-04 00:22:25 (GMT) |
commit | 730e386291cb7aad8f532125216b2ec71d710748 (patch) | |
tree | fba5ac405d3746f89980bf54e668147497196ce9 /Source/CPack | |
parent | c4a26b70cbaa1708b3ad28f2d09976fd7b1c925e (diff) | |
download | CMake-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/CPack')
-rw-r--r-- | Source/CPack/cpack.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 2aa5991..ad37c42 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -26,6 +26,7 @@ #include <cmsys/CommandLineArguments.hxx> #include <cmsys/SystemTools.hxx> #include <cmsys/Encoding.hxx> +#include <locale.h> //---------------------------------------------------------------------------- static const char * cmDocumentationName[][2] = @@ -100,6 +101,7 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, // this is CPack. int main (int argc, char const* const* argv) { + setlocale(LC_ALL, ""); cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = args.argc(); |