Do not use named locales on Windows.

This commit is contained in:
Martin Brodbeck 2022-09-26 11:21:03 +02:00
parent 85574ff08a
commit 144f61d6d4

View file

@ -27,7 +27,11 @@ std::string formatCentAsEuroString(const int cent, int width)
return currStream.str();*/ return currStream.str();*/
#if defined(_WIN64) || defined(_WIN32)
std::locale myLocale;
#else
std::locale myLocale{"de_DE.utf8"}; std::locale myLocale{"de_DE.utf8"};
#endif
return fmt::format(myLocale, "{:{}.2Lf} €", cent / 100.0L, width); return fmt::format(myLocale, "{:{}.2Lf} €", cent / 100.0L, width);
} }