summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-10-23 15:04:30 +0000
committerTiago Cunha <tcunha@gmx.com>2011-10-23 15:04:30 +0000
commit98e500f5982a92f6ca1910193c1d6f5ac07ef52b (patch)
treee5d482ae41fd649c55ba79d2a2586c1ddbe0cc9b /tmux.c
parent1c1797e4f29012a60727a1793e5f75bd769f5d14 (diff)
Sync OpenBSD patchset 966:
Ignore LC_ALL and LC_CTYPE if they are empty as well as unset.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmux.c b/tmux.c
index bf9ee037..9852c734 100644
--- a/tmux.c
+++ b/tmux.c
@@ -295,8 +295,8 @@ main(int argc, char **argv)
* if not they know that output from UTF-8-capable programs may
* be wrong.
*/
- if ((s = getenv("LC_ALL")) == NULL) {
- if ((s = getenv("LC_CTYPE")) == NULL)
+ if ((s = getenv("LC_ALL")) == NULL || *s == '\0') {
+ if ((s = getenv("LC_CTYPE")) == NULL || *s == '\0')
s = getenv("LANG");
}
if (s != NULL && (strcasestr(s, "UTF-8") != NULL ||