mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
Fix TTY UTF-8 logging
This commit is contained in:
parent
5b41d5880d
commit
026077a7f8
@ -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());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user