From 1c46f9d9ba41f4894530deccaff6d0449e6c8760 Mon Sep 17 00:00:00 2001 From: neothenil <727549953@qq.com> Date: Tue, 22 Aug 2023 12:29:06 +0800 Subject: [PATCH] Fix encoding issue in qt_sinks --- include/spdlog/sinks/qt_sinks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/sinks/qt_sinks.h b/include/spdlog/sinks/qt_sinks.h index 565a292c..18980ad9 100644 --- a/include/spdlog/sinks/qt_sinks.h +++ b/include/spdlog/sinks/qt_sinks.h @@ -162,7 +162,7 @@ protected: const string_view_t str = string_view_t(formatted.data(), formatted.size()); // apply the color to the color range in the formatted message. - auto payload = QString::fromLatin1(str.data(), static_cast(str.size())); + auto payload = QString::fromUtf8(str.data(), static_cast(str.size())); invoke_params params{max_lines_, // max lines qt_text_edit_, // text edit to append to