From 15f9e1bea7643bd9460d5d5fcb5df65c8715cad2 Mon Sep 17 00:00:00 2001 From: Yukari Hafner Date: Fri, 20 Jun 2025 22:01:43 +0200 Subject: [PATCH] Check whether locales are the empty string and ignore them if they are. This fixes a confusing error in compiling the xkb compose table if LC_ALL, LC_CTYPE, or LANG are set to the empty string. --- src/wl_window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index 72c1a402..25b8e4c4 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1682,11 +1682,11 @@ static void keyboardHandleKeymap(void* userData, // Look up the preferred locale, falling back to "C" as default. locale = getenv("LC_ALL"); - if (!locale) + if (!locale || strlen(locale) == 0) locale = getenv("LC_CTYPE"); - if (!locale) + if (!locale || strlen(locale) == 0) locale = getenv("LANG"); - if (!locale) + if (!locale || strlen(locale) == 0) locale = "C"; composeTable =