commit 76d9960dbe86d3f32fbed054e5e27d2903aea710
parent 3009ab422d136b8aefda080f585e51cd8d93b7fd
Author: Ran Benita <ran234@gmail.com>
Date: Sun, 13 Aug 2017 18:06:04 +0300
Change the locale discovery procedure to treat empty string same as unset
This is explained in the commit message here:
https://github.com/xkbcommon/libxkbcommon/commit/f468f0b2430e15cc262c5745445580bd0dc64ef0
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/i3lock.c b/i3lock.c
@@ -977,11 +977,11 @@ int main(int argc, char *argv[]) {
errx(EXIT_FAILURE, "Could not load keymap");
const char *locale = getenv("LC_ALL");
- if (!locale)
+ if (!locale || !*locale)
locale = getenv("LC_CTYPE");
- if (!locale)
+ if (!locale || !*locale)
locale = getenv("LANG");
- if (!locale) {
+ if (!locale || !*locale) {
if (debug_mode)
fprintf(stderr, "Can't detect your locale, fallback to C\n");
locale = "C";