mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Actually fix issue 3659.
check for cp932 using ::IsValidCodePage before creating the wxCSConv if it is possible for linux distro or mac to remove the euc_jap cp from install a similar check may be added in WxUtils.cpp git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6928 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -19,9 +19,26 @@
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/fontmap.h>
|
||||
|
||||
namespace WxUtils {
|
||||
|
||||
wxCSConv *SJISConv()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
static bool validCP932 = ::IsValidCodePage(932) != 0;
|
||||
if (validCP932)
|
||||
{
|
||||
return new wxCSConv(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
|
||||
}
|
||||
WARN_LOG(COMMON, "Cannot Convert from Charset Windows Japanese cp 932");
|
||||
return (wxCSConv*)wxConvCurrent;
|
||||
#else
|
||||
return new wxCSConv(wxFontMapper::GetEncodingName(wxFONTENCODING_EUC_JP));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Launch a file according to its mime type
|
||||
void Launch(const char *filename)
|
||||
{
|
||||
|
Reference in New Issue
Block a user