From 9672d96fa499afc550b0cae30c7c018873be2cb6 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Wed, 10 Dec 2025 03:47:08 +0100 Subject: [PATCH] fix: unittests sets locale before testing the convert_with_stringstream seems to be missing a .imbue() call to set the locale independent of the global state. Not setting this, can in some settings lead to errors, see Issue #1366. --- test/fptostring_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/fptostring_test.cpp b/test/fptostring_test.cpp index 3f377abf2..3301c63b3 100644 --- a/test/fptostring_test.cpp +++ b/test/fptostring_test.cpp @@ -10,6 +10,7 @@ namespace { template static std::string convert_with_stringstream(T v, size_t precision = 0) { std::stringstream ss; + ss.imbue(std::locale::classic()); if (precision > 0) { ss << std::setprecision(precision); }