From c2b0fdae5b8b3bb3c0ac79f890e180672af27bb3 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 23 Jun 2009 18:27:40 +0000 Subject: [PATCH] LC_ALL overrides LC_CTYPE and LANG. Comment was correct but the code wrong. Pointed out by Hannah Schroeter, thanks. --- tmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmux.c b/tmux.c index 88f76780..ee05cc19 100644 --- a/tmux.c +++ b/tmux.c @@ -332,8 +332,8 @@ main(int argc, char **argv) * if not they know that output from UTF-8-capable programs may * be wrong. */ - if ((s = getenv("LC_CTYPE")) == NULL) { - if ((s = getenv("LC_ALL")) == NULL) + if ((s = getenv("LC_ALL")) == NULL) { + if ((s = getenv("LC_CTYPE")) == NULL) s = getenv("LANG"); } if (s != NULL && strcasestr(s, "UTF-8") != NULL)