unicode: check $LC_CTYPE too to detect Unicode mode

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2013-07-05 22:00:57 +02:00
parent 4f9fc1e5f5
commit 2301d127a2
4 changed files with 13 additions and 2 deletions

View File

@@ -2045,6 +2045,7 @@ static void get_user_input(struct in_str *i)
* shell was started. Therefore, re-check LANG every time:
*/
const char *s = get_local_var_value("LC_ALL");
if (!s) s = get_local_var_value("LC_CTYPE");
if (!s) s = get_local_var_value("LANG");
reinit_unicode(s);