X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/030c0beade81092da145abc94b2750cd11a3be0b..29149a64916d6fdc53e445adca9ef83bc58fb6c3:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 6c376a95a6..9d86e167ab 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -94,9 +94,7 @@ typedef unsigned char size_t8; { // Asserting a sizeof directly causes some compilers to // issue a "using constant in a conditional expression" warning - size_t intsize = sizeof(int); - - wxASSERT_MSG( intsize == 4, + wxASSERT_MSG( wxAssertIsEqual(sizeof(int), 4), "size_t32 is incorrectly defined!" ); } } intsizechecker; @@ -510,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 ) { @@ -528,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 @@ -548,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 } @@ -934,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) @@ -991,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() ) {