Sync OpenBSD patchset 966:

Ignore LC_ALL and LC_CTYPE if they are empty as well as unset.
pull/1/head
Tiago Cunha 2011-10-23 15:04:30 +00:00
parent 1c1797e4f2
commit 98e500f598
1 changed files with 2 additions and 2 deletions

4
tmux.c
View File

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