From 4f7df957eb0e522fe9a36692540f44a2943d85c9 Mon Sep 17 00:00:00 2001 From: David Korth Date: Sat, 11 May 2019 15:11:35 -0400 Subject: [PATCH] Mst::loadMST(): Convert the string table name from Shift-JIS to UTF-8. --- src/Mst.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mst.cpp b/src/Mst.cpp index 3f90f0c..f055aa6 100644 --- a/src/Mst.cpp +++ b/src/Mst.cpp @@ -240,9 +240,8 @@ int Mst::loadMST(const TCHAR *filename) break; } - // TODO: Convert from Shift-JIS to UTF-8. size_t msgNameLen = strnlen(pMsgName, reinterpret_cast(pDiffTblEnd) - pMsgName); - m_name = string(pMsgName, msgNameLen); + m_name = cpN_to_utf8(932, pMsgName, static_cast(msgNameLen)); } while (0); // Temporary string for text.