From 658b68900236dcab23368ef94fe108aefb50159a Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Mon, 30 Aug 2021 11:04:06 +0200 Subject: [PATCH] Workspaces needs to be set as UNICODE in order to work (#1557) * Workspaces needs to be set as UNICODE in order to work * Added consistency Co-authored-by: Ladislav Zezula --- cli/yara.c | 2 +- windows/vs2017/yara/yara.vcxproj | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/yara.c b/cli/yara.c index 170168d1..ea2c041c 100644 --- a/cli/yara.c +++ b/cli/yara.c @@ -1338,7 +1338,7 @@ int _tmain(int argc, const char_t** argv) return EXIT_FAILURE; } -#if defined(_WIN32) +#if defined(_WIN32) && defined(_UNICODE) // In Windows set stdout to UTF-8 mode. if (_setmode(_fileno(stdout), _O_U8TEXT) == -1) { diff --git a/windows/vs2017/yara/yara.vcxproj b/windows/vs2017/yara/yara.vcxproj index 6a6c0d52..93febb52 100644 --- a/windows/vs2017/yara/yara.vcxproj +++ b/windows/vs2017/yara/yara.vcxproj @@ -28,13 +28,13 @@ Application true - MultiByte + Unicode v141 Application true - MultiByte + Unicode true v141 @@ -42,14 +42,14 @@ Application false true - MultiByte + Unicode v141 Application false true - MultiByte + Unicode v141