From f1fb9f9164d77da0a539a2c9c32c01a3db61be48 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 29 Jun 2026 16:11:42 +0200 Subject: [PATCH] Fix TTY UTF-8 logging --- rpcs3/rpcs3qt/log_frame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/rpcs3qt/log_frame.cpp b/rpcs3/rpcs3qt/log_frame.cpp index 61ca66a909..2d07bcdb26 100644 --- a/rpcs3/rpcs3qt/log_frame.cpp +++ b/rpcs3/rpcs3qt/log_frame.cpp @@ -638,7 +638,7 @@ void log_frame::UpdateUI() // If ANSI TTY is enabled, remove all control characters except for ESC (0x1B) for ANSI sequences if (m_ansi_tty) { - buf_line.erase(std::remove_if(buf_line.begin(), buf_line.end(), [](s8 c) + buf_line.erase(std::remove_if(buf_line.begin(), buf_line.end(), [](u8 c) // Use u8. Otherwise we drop valid UTF-8 characters. { return c <= 0x8 || c == 0x7F || (c >= 0xE && c <= 0x1F && c != 0x1B); }), buf_line.end()); @@ -646,7 +646,7 @@ void log_frame::UpdateUI() // Otherwise, remove all control characters to keep the output clean else { - buf_line.erase(std::remove_if(buf_line.begin(), buf_line.end(), [](s8 c) + buf_line.erase(std::remove_if(buf_line.begin(), buf_line.end(), [](u8 c) // Use u8. Otherwise we drop valid UTF-8 characters. { return c <= 0x8 || c == 0x7F || (c >= 0xE && c <= 0x1F); }), buf_line.end());