aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2013-10-13 03:33:34 +0000
committerTatsuya Kinoshita <tats@debian.org>2013-10-13 03:33:34 +0000
commitaf8e8cf7d15150a3c752d2995a14a5c44efe39cf (patch)
treeb6f0ffba0920549202ccbdfd762ba7da0193338b
parentMerge branch 'bug/maxcol' (diff)
parentDo not fail when LANG is not set (diff)
downloadw3m-af8e8cf7d15150a3c752d2995a14a5c44efe39cf.tar.gz
w3m-af8e8cf7d15150a3c752d2995a14a5c44efe39cf.zip
Merge branch 'bug/cygwin-lang'
-rw-r--r--terms.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/terms.c b/terms.c
index 8d928a2..9798ae1 100644
--- a/terms.c
+++ b/terms.c
@@ -222,6 +222,7 @@ static void
check_cygwin_console(void)
{
char *term = getenv("TERM");
+ char *ctype;
HANDLE hWnd;
if (term == NULL)
@@ -236,7 +237,9 @@ check_cygwin_console(void)
isLocalConsole = 1;
}
}
- if (strncmp(getenv("LANG"), "ja", 2) == 0) {
+ if ((ctype = getenv("LC_ALL") ||
+ ctype = getenv("LC_CTYPE") ||
+ ctype = getenv("LANG")) && strncmp(ctype, "ja", 2) == 0) {
isWinConsole = TERM_CYGWIN_RESERVE_IME;
}
#ifdef SUPPORT_WIN9X_CONSOLE_MBCS