summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Viennot <nicolas@viennot.biz>2019-10-12 21:09:39 -0400
committerNicolas Viennot <nicolas@viennot.biz>2019-10-12 21:10:03 -0400
commit7153958e9908658383438745592d9a8da64b2a3f (patch)
treeca85617118117effd5b6ea1b78d9b3ee7e1605d1
parent74ff5229830afcca8cd57976a48632fef6f85c17 (diff)
Allow the use of C.UTF-8 locale
-rw-r--r--tmux.c6
1 files 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);
}