if ( m_strShort.IsEmpty() ) {
// FIXME I don't know how these 2 letter abbreviations are formed,
// this wild guess is surely wrong
- m_strShort = tolower(szLocale[0]) + tolower(szLocale[1]);
+ if ( szLocale[0] )
+ {
+ m_strShort += (wxChar)wxTolower(szLocale[0]);
+ if ( szLocale[1] )
+ m_strShort += (wxChar)wxTolower(szLocale[1]);
+ }
}
// save the old locale to be able to restore it later
return (wxMB2WXbuf)(szOrigString);
}
- else
- {
- return wxConvertMB2WX(pszTrans); // or preferably wxCSConv(charset).cMB2WX(pszTrans) or something,
- // a macro similar to wxConvertMB2WX could be written for that
- }
+ // or preferably wxCSConv(charset).cMB2WX(pszTrans) or something, a macro
+ // similar to wxConvertMB2WX could be written for that
+
+ return wxConvertMB2WX(pszTrans);
+
+ // undo the hack from the beginning of this function
#undef szOrgString
}