From 7153958e9908658383438745592d9a8da64b2a3f Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Sat, 12 Oct 2019 21:09:39 -0400 Subject: [PATCH] Allow the use of C.UTF-8 locale --- tmux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmux.c b/tmux.c index d55c2e1d..d7cf8d97 100644 --- a/tmux.c +++ b/tmux.c @@ -205,12 +205,12 @@ main(int argc, char **argv) const char *s; int opt, flags, keys; - if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL) { + if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL && + setlocale(LC_CTYPE, "C.UTF-8") == NULL) { if (setlocale(LC_CTYPE, "") == NULL) errx(1, "invalid LC_ALL, LC_CTYPE or LANG"); s = nl_langinfo(CODESET); - if (strcasecmp(s, "UTF-8") != 0 && - strcasecmp(s, "UTF8") != 0) + if (strcasecmp(s, "UTF-8") != 0 && strcasecmp(s, "UTF8") != 0) errx(1, "need UTF-8 locale (LC_CTYPE) but have %s", s); }