mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-12 11:08:56 +00: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:
parent
cbc520a70a
commit
826e37a279
6 changed files with 33 additions and 26 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue