OS X std::locale only supports the "C" locale and will give an exception

on any other, including "" when a different one is specified through the
POSIX locale environment variables.

This is not normally a problem since these variables are stripped out from
the environment when an application is launched by the Finder. This is not
the case when running the binary directly from the command line, such as
when debugging.

I have temporarily disabled the use of std::locale("") on OS X while I try
to come up with a better solution.

Fixes issue 3598.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6615 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-12-19 16:11:55 +00:00
parent fe9e72d6dc
commit 98e89c9329
1 changed files with 2 additions and 0 deletions

View File

@ -52,7 +52,9 @@ template <typename I>
std::string ThousandSeparate(I value, int spaces = 0)
{
std::ostringstream oss;
#ifndef __APPLE__ // XXX
oss.imbue(std::locale(""));
#endif
oss << std::setw(spaces) << value;
return oss.str();