diff options
-rw-r--r-- | src/common/Utilities/Locales.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/common/Utilities/Locales.cpp b/src/common/Utilities/Locales.cpp index b4048b9c3f3..b4aa22179cf 100644 --- a/src/common/Utilities/Locales.cpp +++ b/src/common/Utilities/Locales.cpp @@ -20,23 +20,28 @@ namespace { -std::locale _utf8; +std::locale _global; std::locale _calendar; } void Trinity::Locale::Init() { // Change global locale from "C" to UTF-8 for c runtime functions - _utf8 = std::locale(""); - std::locale::global(_utf8); + std::locale utf8(""); + _global = utf8; + _global = std::locale(_global, std::locale::classic(), std::locale::numeric); + std::locale::global(_global); + + std::setlocale(LC_ALL, ""); + std::setlocale(LC_NUMERIC, "C"); boost::locale::generator g; - _calendar = g.generate(_utf8, ""); + _calendar = g.generate(utf8, ""); } std::locale const& Trinity::Locale::GetGlobalLocale() { - return _utf8; + return _global; } std::locale const& Trinity::Locale::GetCalendarLocale() |