From c0be228c71f8e7a6d683514cc22651c76c97fd81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 13 Aug 2016 16:01:20 +0200 Subject: [PATCH] Convert OSREPORT text from SJIS to UTF-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm not sure this is the correct fix, but it looks like OSREPORT output is Shift-JIS, so we need to convert it to UTF-8. Most characters work fine without and with this conversion, but Japanese text completely fails and results in outputting invalid UTF-8 (which gets shown as �). --- Source/Core/Core/HW/EXI_DeviceIPL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/HW/EXI_DeviceIPL.cpp b/Source/Core/Core/HW/EXI_DeviceIPL.cpp index 4cae293f0b..35e6bb5388 100644 --- a/Source/Core/Core/HW/EXI_DeviceIPL.cpp +++ b/Source/Core/Core/HW/EXI_DeviceIPL.cpp @@ -11,6 +11,7 @@ #include "Common/FileUtil.h" #include "Common/Logging/Log.h" #include "Common/MemoryUtil.h" +#include "Common/StringUtil.h" #include "Common/Timer.h" #include "Core/ConfigManager.h" #include "Core/Core.h" @@ -340,7 +341,7 @@ void CEXIIPL::TransferByte(u8& _uByte) if (_uByte == '\r') { - NOTICE_LOG(OSREPORT, "%s", m_buffer.c_str()); + NOTICE_LOG(OSREPORT, "%s", SHIFTJISToUTF8(m_buffer).c_str()); m_buffer.clear(); } }