diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 22fdd89a8d..53485199e3 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -446,7 +446,9 @@ void CGameListCtrl::InsertItemInReportView(long _Index) WARN_LOG(COMMON, "Cannot Convert from Charset Windows Japanese cp 932"); } #else - wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); + // on linux the wrong string is returned from wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS) + // it returns CP-932, in order to use iconv we need to use CP932 + wxCSConv SJISConv(L"CP932"); #endif GameListItem& rISOFile = *m_ISOFiles[_Index]; diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 71771e48a7..40c78bba4e 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -1278,8 +1278,10 @@ void CISOProperties::ChangeBannerDetails(int lang) WARN_LOG(COMMON, "Cannot Convert from Charset Windows Japanese cp 932"); } #else - wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); -#endif + // on linux the wrong string is returned from wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS) + // it returns CP-932, in order to use iconv we need to use CP932 + wxCSConv SJISConv(L"CP932"); +#endif switch (OpenGameListItem->GetCountry()) { case DiscIO::IVolume::COUNTRY_TAIWAN: diff --git a/Source/Core/DolphinWX/Src/LogWindow.cpp b/Source/Core/DolphinWX/Src/LogWindow.cpp index 94b542eb2f..3942988efe 100644 --- a/Source/Core/DolphinWX/Src/LogWindow.cpp +++ b/Source/Core/DolphinWX/Src/LogWindow.cpp @@ -41,7 +41,7 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos, , x(0), y(0), winpos(0) , Parent(parent) , m_LogAccess(true) , m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL) - , m_SJISConv(wxT("")) + , m_SJISConv(*(wxCSConv*)wxConvCurrent) { #ifdef _WIN32 static bool validCP932 = ::IsValidCodePage(932) != 0; @@ -52,10 +52,11 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos, else { WARN_LOG(COMMON, "Cannot Convert from Charset Windows Japanese cp 932"); - m_SJISConv = *(wxCSConv*)wxConvCurrent; } #else - m_SJISConv = wxCSConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); + // on linux the wrong string is returned from wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS) + // it returns CP-932, in order to use iconv we need to use CP932 + m_SJISConv = wxCSConv(L"CP932"); #endif m_LogManager = LogManager::GetInstance(); diff --git a/Source/Core/DolphinWX/Src/MemcardManager.cpp b/Source/Core/DolphinWX/Src/MemcardManager.cpp index 7eb0243e2c..68ae0f9ff2 100644 --- a/Source/Core/DolphinWX/Src/MemcardManager.cpp +++ b/Source/Core/DolphinWX/Src/MemcardManager.cpp @@ -701,10 +701,22 @@ bool CMemcardManager::ReloadMemcard(const char *fileName, int card) if (!memoryCard[card]->DEntry_Comment2(j, comment)) comment[0]=0; bool ascii = memoryCard[card]->IsAsciiEncoding(); + #ifdef _WIN32 - wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); + wxCSConv SJISConv(*(wxCSConv*)wxConvCurrent); + static bool validCP932 = ::IsValidCodePage(932) != 0; + if (validCP932) + { + SJISConv = wxCSConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS)); + } + else + { + WARN_LOG(COMMON, "Cannot Convert from Charset Windows Japanese cp 932"); + } #else - wxCSConv SJISConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP)); + // on linux the wrong string is returned from wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS) + // it returns CP-932, in order to use iconv we need to use CP932 + wxCSConv SJISConv(L"CP932"); #endif wxTitle = wxString(title, ascii ? *wxConvCurrent : SJISConv); wxComment = wxString(comment, ascii ? *wxConvCurrent : SJISConv);