}
}
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
+ (void)convertEncoding; // get rid of warnings about unused parameter
}
wxString wxMsgCatalogFile::GetCharset() const
// TODO: how to find languageId
// SetLocaleInfo(languageId, SORT_DEFAULT, localeName);
#else
- m_pszOldLocale = wxStrdup(wxSetlocale(LC_ALL, szLocale));
+ m_pszOldLocale = wxSetlocale(LC_ALL, szLocale);
+ if ( m_pszOldLocale )
+ m_pszOldLocale = wxStrdup(m_pszOldLocale);
#endif
if ( m_pszOldLocale == NULL )
// to Unix98)
char *oldLocale = strdup(setlocale(LC_CTYPE, NULL));
setlocale(LC_CTYPE, "");
- char *alang = nl_langinfo(CODESET);
+ const char *alang = nl_langinfo(CODESET);
setlocale(LC_CTYPE, oldLocale);
free(oldLocale);