errx(EXIT_FAILURE, "Could not load keymap");
const char *locale = getenv("LC_ALL");
errx(EXIT_FAILURE, "Could not load keymap");
const char *locale = getenv("LC_ALL");
+ if (!locale || !*locale)
locale = getenv("LC_CTYPE");
locale = getenv("LC_CTYPE");
+ if (!locale || !*locale)
+ if (!locale || !*locale) {
if (debug_mode)
fprintf(stderr, "Can't detect your locale, fallback to C\n");
locale = "C";
if (debug_mode)
fprintf(stderr, "Can't detect your locale, fallback to C\n");
locale = "C";