diff --git a/src/unit_test.cpp b/src/unit_test.cpp index e4ec4e0..989106c 100644 --- a/src/unit_test.cpp +++ b/src/unit_test.cpp @@ -264,26 +264,27 @@ static bool checkDataConversionsProduceExpected(void){ } static bool CheckForUtfEnvironment(void) { - ILogMessage("\tChecking for UTF locale. ☹"); + ILogMessage("\tChecking for UTF locale. ☺"); try { bool utfEnvironment{ true }; + std::string cum{}; if constexpr (b_WINDOWS) { auto ACP{ GetACP() }; // Check that windows thinks this is UTF8 utfEnvironment = utfEnvironment && (ACP == 65001); if (!utfEnvironment) { - szError = std::format("current code page {}, —should be 65001☹, ", ACP); + cum += std::format("current code page {}, —should be 65001☹, ", ACP); } } auto FontEncoding{ wxLocale::GetSystemEncoding() }; // check that wxWidgets thinks this is UTF8 utfEnvironment = utfEnvironment && (FontEncoding == wxFONTENCODING_UTF8); if (!utfEnvironment) { - szError += std::format("swxFontEncoding {}, – should be {} ☹", + cum += std::format("swxFontEncoding {}, —should be {} ☹", (int)FontEncoding, (int)wxFONTENCODING_UTF8 ); - throw MyException(szError, __LINE__, __func__, SrcFilename); + throw MyException(cum, __LINE__, __func__, SrcFilename); } } catch (const MyException& e) {