From f4a529986fda448602dfc85761abe023842c5c2e Mon Sep 17 00:00:00 2001 From: Giuseppe Penone Date: Mon, 17 Jun 2024 21:24:52 +0100 Subject: [PATCH] debugging issue with locale (#2529) --- src/ct/ct_main.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ct/ct_main.cc b/src/ct/ct_main.cc index ec5a23ca5..bebf4de74 100644 --- a/src/ct/ct_main.cc +++ b/src/ct/ct_main.cc @@ -54,6 +54,15 @@ void glib_log_handler(const gchar*/*log_domain*/, GLogLevelFlags log_level, cons int main(int argc, char *argv[]) { +#if !defined(_WIN32) && !defined(__APPLE__) + try { + std::locale::global(std::locale("")); // Set the global C++ locale to the user-specified locale + } + catch (std::exception& e) { + g_warning("%s\n", e.what()); + } +#endif /* !_WIN32 && !__APPLE__ */ + { const char* pExePath = argv[0]; #if defined(_WIN32)