Merge pull request #7346 from Icinga/feature/check-plugins-code-page-7110

DaemonCommand#Run(): set code page to UTF-8
This commit is contained in:
Michael Friedrich 2019-08-27 14:51:30 +02:00 committed by GitHub
commit 9d6ee44e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -24,7 +24,9 @@
#include <iostream>
#include <fstream>
#ifndef _WIN32
#ifdef _WIN32
#include <windows.h>
#else /* _WIN32 */
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
@ -550,6 +552,10 @@ public:
*/
int DaemonCommand::Run(const po::variables_map& vm, const std::vector<std::string>& ap) const
{
#ifdef _WIN32
SetConsoleOutputCP(65001);
#endif /* _WIN32 */
Logger::EnableTimestamp();
Log(LogInformation, "cli")