LC_ALL overrides LC_CTYPE and LANG. Comment was correct but the code

wrong. Pointed out by Hannah Schroeter, thanks.
This commit is contained in:
Nicholas Marriott 2009-06-23 18:27:40 +00:00
parent 89262c62fe
commit c2b0fdae5b

4
tmux.c
View File

@ -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)