diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-07-05 22:00:57 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-07-05 22:00:57 +0200 |
commit | 2301d127a2676303eac563e7932c03d9d72c446e (patch) | |
tree | 9bb912bd5df0a5b5676837e26625672a61f41ad8 /shell | |
parent | 4f9fc1e5f5897dd2d143fa837f9288d55cf57f51 (diff) | |
download | busybox-w32-2301d127a2676303eac563e7932c03d9d72c446e.tar.gz busybox-w32-2301d127a2676303eac563e7932c03d9d72c446e.tar.bz2 busybox-w32-2301d127a2676303eac563e7932c03d9d72c446e.zip |
unicode: check $LC_CTYPE too to detect Unicode mode
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 1 | ||||
-rw-r--r-- | shell/hush.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index 90f222467..d696bbdac 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9659,6 +9659,7 @@ preadfd(void) | |||
9659 | */ | 9659 | */ |
9660 | { | 9660 | { |
9661 | const char *s = lookupvar("LC_ALL"); | 9661 | const char *s = lookupvar("LC_ALL"); |
9662 | if (!s) s = lookupvar("LC_CTYPE"); | ||
9662 | if (!s) s = lookupvar("LANG"); | 9663 | if (!s) s = lookupvar("LANG"); |
9663 | reinit_unicode(s); | 9664 | reinit_unicode(s); |
9664 | } | 9665 | } |
diff --git a/shell/hush.c b/shell/hush.c index 1fa84dc4f..fc9b89b55 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2045,6 +2045,7 @@ static void get_user_input(struct in_str *i) | |||
2045 | * shell was started. Therefore, re-check LANG every time: | 2045 | * shell was started. Therefore, re-check LANG every time: |
2046 | */ | 2046 | */ |
2047 | const char *s = get_local_var_value("LC_ALL"); | 2047 | const char *s = get_local_var_value("LC_ALL"); |
2048 | if (!s) s = get_local_var_value("LC_CTYPE"); | ||
2048 | if (!s) s = get_local_var_value("LANG"); | 2049 | if (!s) s = get_local_var_value("LANG"); |
2049 | reinit_unicode(s); | 2050 | reinit_unicode(s); |
2050 | 2051 | ||