X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f7617cad6ad9873f4d2519a82e8f458d4cce2d9..66e2ba91b27a5867ef46cc16049c2a7c61c811f1:/src/common/fmapbase.cpp diff --git a/src/common/fmapbase.cpp b/src/common/fmapbase.cpp index 48e1b2e148..eb6fe9843f 100644 --- a/src/common/fmapbase.cpp +++ b/src/common/fmapbase.cpp @@ -31,6 +31,7 @@ #include "wx/log.h" #include "wx/intl.h" #include "wx/module.h" + #include "wx/wxcrtvararg.h" #endif //WX_PRECOMP #if defined(__WXMSW__) @@ -98,10 +99,11 @@ static wxFontEncoding gs_encodings[] = wxFONTENCODING_BIG5, wxFONTENCODING_SHIFT_JIS, wxFONTENCODING_GB2312, + wxFONTENCODING_ISO2022_JP, }; // the descriptions for them -static const wxChar* gs_encodingDescs[] = +static const char* gs_encodingDescs[] = { wxTRANSLATE( "Western European (ISO-8859-1)" ), wxTRANSLATE( "Central European (ISO-8859-2)" ), @@ -152,6 +154,7 @@ static const wxChar* gs_encodingDescs[] = wxTRANSLATE( "BIG5" ), wxTRANSLATE( "SHIFT-JIS" ), wxTRANSLATE( "GB-2312" ), + wxTRANSLATE( "ISO-2022-JP" ), }; // and the internal names (these are not translated on purpose!) @@ -219,6 +222,7 @@ static const wxChar* gs_encodingNames[WXSIZEOF(gs_encodingDescs)][9] = { wxT( "BIG5" ), wxT("big5"), NULL }, { wxT( "SJIS" ), wxT( "SHIFT-JIS" ), wxT( "SHIFT_JIS" ), NULL }, { wxT( "GB2312" ), NULL }, + { wxT( "ISO-2022-JP" ), NULL }, }; wxCOMPILE_TIME_ASSERT( WXSIZEOF(gs_encodingDescs) == WXSIZEOF(gs_encodings), EncodingsArraysNotInSync ); @@ -336,10 +340,15 @@ void wxFontMapperBase::Reset() // config usage customisation // ---------------------------------------------------------------------------- + +static wxString gs_defaultConfigPath(FONTMAPPER_ROOT_PATH); + /* static */ -const wxChar *wxFontMapperBase::GetDefaultConfigPath() +const wxString& wxFontMapperBase::GetDefaultConfigPath() { - return FONTMAPPER_ROOT_PATH; + // NB: we return const wxString& and not wxString for compatibility + // with 2.8 that returned const wxChar* + return gs_defaultConfigPath; } void wxFontMapperBase::SetConfigPath(const wxString& prefix)