#pragma option -O1
#endif
+#ifdef __EMX__
+// The following define is needed by Innotek's libc to
+// make the definition of struct localeconv available.
+#define __INTERNAL_DEFS
+#endif
+
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// TODO: how to find languageId
// SetLocaleInfo(languageId, SORT_DEFAULT, localeName);
#else
- m_pszOldLocale = wxSetlocale(LC_ALL, szLocale);
- if ( m_pszOldLocale )
- m_pszOldLocale = wxStrdup(m_pszOldLocale);
+ wxMB2WXbuf oldLocale = wxSetlocale(LC_ALL, szLocale);
+ if ( oldLocale )
+ m_pszOldLocale = wxStrdup(oldLocale);
+ else
+ m_pszOldLocale = NULL;
#endif
if ( m_pszOldLocale == NULL )
#ifdef __WXMSW__
/* static */
-wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat)
+wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
{
wxString str;
wxChar buffer[256];
switch (index)
{
case wxLOCALE_THOUSANDS_SEP:
- return locale_info->thousands_sep;
+ return wxString(locale_info->thousands_sep,
+ *wxConvCurrent);
case wxLOCALE_DECIMAL_POINT:
- return locale_info->decimal_point;
+ return wxString(locale_info->decimal_point,
+ *wxConvCurrent);
default:
return wxEmptyString;
}
switch (index)
{
case wxLOCALE_THOUSANDS_SEP:
- return locale_info->mon_thousands_sep;
+ return wxString(locale_info->mon_thousands_sep,
+ *wxConvCurrent);
case wxLOCALE_DECIMAL_POINT:
- return locale_info->mon_decimal_point;
+ return wxString(locale_info->mon_decimal_point,
+ *wxConvCurrent);
default:
return wxEmptyString;
}