From 0bdf456997d725992657ab5c861bfa03e89e1ac9 Mon Sep 17 00:00:00 2001 From: xyz1001 Date: Fri, 19 May 2023 18:18:50 +0800 Subject: [PATCH] Fix compiler error with msvc on non-unicode system --- CHANGELOG.md | 4 ++++ CMakeLists.txt | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb0c31af4..4137a6666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Updated Breakpad backend to 2023-05-03. ([#836](https://github.com/getsentry/sentry-native/pull/836), [breakpad#35](https://github.com/getsentry/breakpad/pull/35)) - Updated Crashpad backend to 2023-05-03. ([#837](https://github.com/getsentry/sentry-native/pull/837), [crashpad#82](https://github.com/getsentry/crashpad/pull/82)) +**Fixes**: + +- Fix MSVC compiler error with on non-Unicode systems ([#846](https://github.com/getsentry/sentry-native/pull/846), [crashpad#85](https://github.com/getsentry/crashpad/pull/85)) + ## 0.6.2 **Features**: diff --git a/CMakeLists.txt b/CMakeLists.txt index aeea09f81..3ec677899 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,9 @@ endif() if(MSVC) option(SENTRY_BUILD_RUNTIMESTATIC "Build sentry-native with static runtime" OFF) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") endif() if(LINUX)