mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2 (Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale calls added later in their spirit. CMake has not been taught how to deal with non-C locales everywhere. We do not define any functionality for character conversions for non-ASCII strings. Another solution will be needed to address the original problem motivating addition of setlocale() calls.
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include "cmCursesMainForm.h"
|
||||
#include "cmCursesStandardIncludes.h"
|
||||
@@ -95,8 +94,6 @@ void CMakeMessageHandler(const char* message, const char* title, bool&,
|
||||
|
||||
int main(int argc, char const* const* argv)
|
||||
{
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
cmsys::Encoding::CommandLineArguments encoding_args =
|
||||
cmsys::Encoding::CommandLineArguments::Main(argc, argv);
|
||||
argc = encoding_args.argc();
|
||||
|
||||
Reference in New Issue
Block a user