From 332b267ae68fd37725d47f2617de3b1cb0c7f78e Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Sat, 11 Oct 2025 08:59:23 -0300 Subject: [PATCH] use en_US locale instead of user's, fallback to C if not found most likely every windows install has en_US available, even if in other languages. if not, bring back the insertcommas function from history, no biggie --- Utils/Text Utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Utils/Text Utils.cpp b/Utils/Text Utils.cpp index 7ef2bb52..acb9ebb7 100644 --- a/Utils/Text Utils.cpp +++ b/Utils/Text Utils.cpp @@ -9,7 +9,12 @@ auto FormatMoney(INT32 iNumber) -> std::wstring { static std::wstringstream wss([] { std::wstringstream ss; - ss.imbue(std::locale("")); + try { + ss.imbue(std::locale("en_US.UTF-8")); + } + catch (const std::exception&) { + ss.imbue(std::locale::classic()); + } return ss; }()); wss.str(L"");