git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35586
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxMB2WXbuf retloc = wxSetlocaleTryUTF(LC_ALL, locale);
wxMB2WXbuf retloc = wxSetlocaleTryUTF(LC_ALL, locale);
+#ifdef __AIX__
+ // at least in AIX 5.2 libc is buggy and the string returned from setlocale(LC_ALL)
+ // can't be passed back to it because it returns 6 strings (one for each locale
+ // category), i.e. for C locale we get back "C C C C C C"
+ //
+ // this contradicts IBM own docs but this is not of much help, so just work around
+ // it in the crudest possible manner
+ wxChar *p = wxStrchr((wxChar *)retloc, _T(' '));
+ if ( p )
+ *p = _T('\0');
+#endif // __AIX__
+
if ( !retloc )
{
// Some C libraries don't like xx_YY form and require xx only
if ( !retloc )
{
// Some C libraries don't like xx_YY form and require xx only