From f695ae9116ec67a3b0819f6a101dd38b39033095 Mon Sep 17 00:00:00 2001 From: TheCourierNV Date: Wed, 7 Aug 2024 04:53:57 +0200 Subject: [PATCH] Locale (Linux): Add `LC_ALL` check (#1166) `LC_ALL`, if set, overrides every other locale-related environment variable. --- src/detection/locale/locale_linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/detection/locale/locale_linux.c b/src/detection/locale/locale_linux.c index 65b4f9289..4b5123059 100644 --- a/src/detection/locale/locale_linux.c +++ b/src/detection/locale/locale_linux.c @@ -4,6 +4,10 @@ void ffDetectLocale(FFstrbuf* result) { + ffStrbufAppendS(result, getenv("LC_ALL")); + if(result->length > 0) + return; + ffStrbufAppendS(result, getenv("LC_MESSAGES")); if(result->length > 0) return;