X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed582841a275d236b9bac7651a0f3e7c91be868d..1bcfc0e1b91dd7bc2a3144048fbbf5c809943986:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 01d449fd53..5852174e3a 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 } @@ -665,7 +665,7 @@ bool wxLocale::Init(int language, int flags) wxString name = info->Description; wxString canonical = info->CanonicalName; wxString locale; - wxChar *retloc; + const wxChar *retloc; // Set the locale: #ifdef __UNIX__ @@ -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() ) { @@ -1180,7 +1180,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxLocaleModule, wxModule) // This table is generated by misc/languages/genlang.py // When making changes, please put them into misc/languages/langtabl.txt -#ifndef __WIN32__ +#if !defined(__WIN32__) || defined(__WXMICROWIN__) #define SETWINLANG(info,lang,sublang) @@ -1916,7 +1916,5 @@ void wxLocale::InitLanguagesDB() // --- --- --- generated code ends here --- --- --- - - #endif // wxUSE_INTL