aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 7d3547110..92d790180 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1985,10 +1985,14 @@ static void reinit_unicode_for_hush(void)
1985 * _during_ shell execution, not only if it was set when 1985 * _during_ shell execution, not only if it was set when
1986 * shell was started. Therefore, re-check LANG every time: 1986 * shell was started. Therefore, re-check LANG every time:
1987 */ 1987 */
1988 const char *s = get_local_var_value("LC_ALL"); 1988 if (ENABLE_FEATURE_CHECK_UNICODE_IN_ENV
1989 if (!s) s = get_local_var_value("LC_CTYPE"); 1989 || ENABLE_UNICODE_USING_LOCALE
1990 if (!s) s = get_local_var_value("LANG"); 1990 ) {
1991 reinit_unicode(s); 1991 const char *s = get_local_var_value("LC_ALL");
1992 if (!s) s = get_local_var_value("LC_CTYPE");
1993 if (!s) s = get_local_var_value("LANG");
1994 reinit_unicode(s);
1995 }
1992} 1996}
1993 1997
1994 1998