1
0
forked from mirrors/0ad

Fix glwprintf errors on OS X with non-ASCII strings, by setting LC_CTYPE to UTF-8

This was SVN commit r9768.
This commit is contained in:
Ykkrosh
2011-07-06 21:19:59 +00:00
parent e9b3bcf467
commit 899f5105b9
2 changed files with 20 additions and 6 deletions
+7 -2
View File
@@ -65,20 +65,25 @@ class LeakReporter : public CxxTest::GlobalFixture
};
class TimerSetup : public CxxTest::GlobalFixture
class MiscSetup : public CxxTest::GlobalFixture
{
virtual bool setUpWorld()
{
// Timer must be initialised, else things will break when tests do IO
timer_LatchStartTime();
#if OS_MACOSX
// See comment in GameSetup.cpp FixLocales
setlocale(LC_CTYPE, "UTF-8");
#endif
return true;
}
};
static LeakReporter leakReporter;
static TimerSetup timerSetup;
static MiscSetup miscSetup;
// Definition of functions from lib/self_test.h