summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-07-03 08:08:30 +0000
committernicm <nicm@openbsd.org>2017-07-03 08:08:30 +0000
commit662faea67ce0a44468b147efa806bb87d20c01d4 (patch)
treed6b4d245b5fb718abdae4e8c6c9164823ce2a5f1 /usr.bin/tmux/tmux.c
parentAdd the first UART into the fdt blob. (diff)
downloadwireguard-openbsd-662faea67ce0a44468b147efa806bb87d20c01d4.tar.xz
wireguard-openbsd-662faea67ce0a44468b147efa806bb87d20c01d4.zip
Try C.UTF-8 which is also a commonly useful locale on some platforms,
from Romain Francoise.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r--usr.bin/tmux/tmux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 09a649cf181..8c68c31421c 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.182 2017/04/22 12:08:41 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.183 2017/07/03 08:08:30 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -196,7 +196,8 @@ main(int argc, char **argv)
int opt, flags, keys;
const struct options_table_entry *oe;
- 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);