mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-22 16:13:58 +01:00
Allow the use of C.UTF-8 locale
This commit is contained in:
parent
74ff522983
commit
7153958e99
6
tmux.c
6
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user