From e22d8a737efff9516b8013cf796dabb750f396d2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 12 Mar 2026 01:17:09 +0100 Subject: Try to respect LC_NUMERIC even if it doesn't match LANG. With LANG=en_GB.UTF-8 and LC_NUMERIC=de_DE.UTF-8 I get . as a decimal separator, I think because the setlocale(LC_ALL, "") uses $LANG everywhere. This is not what wxWidgets expects, and not what I expect (other applications use ,). Fix that by respecting LC_NUMERIC explicitly. --- src/lib/i18n_setup_linux.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib') diff --git a/src/lib/i18n_setup_linux.cc b/src/lib/i18n_setup_linux.cc index 37207e29d..0be066972 100644 --- a/src/lib/i18n_setup_linux.cc +++ b/src/lib/i18n_setup_linux.cc @@ -52,6 +52,9 @@ dcpomatic::setup_i18n(string forced_language) } setlocale(LC_ALL, ""); + if (auto num = getenv("LC_NUMERIC")) { + setlocale(LC_NUMERIC, num); + } textdomain("libdcpomatic2"); bindtextdomain("libdcpomatic2", mo_path().string().c_str()); -- cgit v1.2.3