--- nono/wx/wxapp.cpp 2026/04/29 17:05:44 1.1.1.19 +++ nono/wx/wxapp.cpp 2026/04/29 17:05:48 1.1.1.20 @@ -41,6 +41,8 @@ class WXApp : public wxApp std::unique_ptr pHostInfo {}; }; +static std::string utf8_to_sjis(const std::string&); + // IMPLEMENT_APP() は闇マクロすぎて clang のちからには耐えられない PRAGMA_PUSH_WARNINGS IMPLEMENT_APP(WXApp) @@ -63,7 +65,7 @@ WXApp::OnRun() { int rv; - rv = gMainApp.Init1(false, argc, argv); + rv = gMainApp.Init1(argc, argv, utf8_to_sjis); if (rv != MainApp::PASS) { return rv; } @@ -449,3 +451,21 @@ WXApp::FindAvailable(const std::vector wxString + wxString wstr(utf8str.c_str(), wxConvUTF8); + + // wxString -> Shift_JIS + wxCharBuffer sjisbuf = wstr.mb_str(conv); + + return std::string(sjisbuf.data()); +}