workaround for buggy setlocale() under AIX (without this wxLocale didn't work at all)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1600,6 +1600,18 @@ bool wxLocale::Init(int language, int flags)
|
|||||||
|
|
||||||
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 )
|
if ( !retloc )
|
||||||
{
|
{
|
||||||
// Some C libraries don't like xx_YY form and require xx only
|
// Some C libraries don't like xx_YY form and require xx only
|
||||||
|
Reference in New Issue
Block a user