From b32254acda43bc4966565f482ccf911b74a95345 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 23 Oct 2011 08:03:27 +0000 Subject: [PATCH] Ignore LC_ALL and LC_CTYPE if they are empty as well as unset. --- tmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmux.c b/tmux.c index 5d4fda72..0c161490 100644 --- a/tmux.c +++ b/tmux.c @@ -289,8 +289,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 ||