X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed582841a275d236b9bac7651a0f3e7c91be868d..ff8b6290e9b7d0c604c35ca938d87cbd1fd157ed:/src/common/intl.cpp?ds=sidebyside diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 01d449fd53..9d86e167ab 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -508,8 +508,6 @@ const char *wxMsgCatalog::GetString(const char *szOrig) const void wxMsgCatalog::ConvertEncoding() { - wxFontEncoding enc; - // first, find encoding header: const char *hdr = StringAtOfs(m_pOrigTable, 0); if ( hdr == NULL || hdr[0] != 0 ) { @@ -526,7 +524,8 @@ void wxMsgCatalog::ConvertEncoding() while (header[n] != wxT('\n')) charset << header[n++]; - enc = wxTheFontMapper->CharsetToEncoding(charset, FALSE); +#if wxUSE_FONTMAP + wxFontEncoding enc = wxTheFontMapper->CharsetToEncoding(charset, FALSE); if ( enc == wxFONTENCODING_SYSTEM ) return; // unknown encoding @@ -546,6 +545,7 @@ void wxMsgCatalog::ConvertEncoding() for (size_t i = 0; i < m_numStrings; i++) converter.Convert((char*)StringAtOfs(m_pTransTable, i)); +#endif // wxUSE_FONTMAP } @@ -932,7 +932,7 @@ wxString wxLocale::GetSystemEncodingName() #ifdef __WIN32__ // FIXME: what is the error return value for GetACP()? UINT codepage = ::GetACP(); - encname.Printf(_T("cp%u"), codepage); + encname.Printf(_T("windows-%u"), codepage); #elif defined(__UNIX_LIKE__) #if defined(HAVE_LANGINFO_H) && defined(CODESET) @@ -989,7 +989,7 @@ wxFontEncoding wxLocale::GetSystemEncoding() { return (wxFontEncoding)(wxFONTENCODING_CP1250 + codepage - 1250); } -#elif defined(__UNIX_LIKE__) +#elif defined(__UNIX_LIKE__) && wxUSE_FONTMAP wxString encname = GetSystemEncodingName(); if ( !encname.empty() ) {