Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
Rechi committed Jan 17, 2017
1 parent d1bb714 commit 6b20d7c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xbmc/LangInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,19 @@ void CLangInfo::CRegion::SetGlobalLocale()
setlocale(LC_CTYPE, strLocale.c_str());
setlocale(LC_TIME, strLocale.c_str());
}
#else
std::wstring strLocaleW;
g_charsetConverter.utf8ToW(strLocale, strLocaleW);
if (_wsetlocale(LC_COLLATE, strLocaleW.c_str()) == NULL ||
_wsetlocale(LC_CTYPE, strLocaleW.c_str()) == NULL ||
_wsetlocale(LC_TIME, strLocaleW.c_str()) == NULL)
{
strLocale = "C";
strLocaleW = L"C";
_wsetlocale(LC_COLLATE, strLocaleW.c_str());
_wsetlocale(LC_CTYPE, strLocaleW.c_str());
_wsetlocale(LC_TIME, strLocaleW.c_str());
}
#endif

g_charsetConverter.resetSystemCharset();
Expand Down

0 comments on commit 6b20d7c

Please sign in to comment.