diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-07-02 17:30:23 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-07-02 17:30:23 +0200 |
commit | 3e7ecb179b193bf17323c975890eed1d025f7e4c (patch) | |
tree | 99b869b4f6fa759aacb2c8e12464797c9e930a3d /shell/ash.c | |
parent | ea267d518ff55517e174b9e8514fc521e4a3b41e (diff) | |
download | busybox-w32-3e7ecb179b193bf17323c975890eed1d025f7e4c.tar.gz busybox-w32-3e7ecb179b193bf17323c975890eed1d025f7e4c.tar.bz2 busybox-w32-3e7ecb179b193bf17323c975890eed1d025f7e4c.zip |
unicode: check $LC_ALL to detect Unicode mode, not only $LANG
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 6af14f551..90f222467 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9657,7 +9657,11 @@ preadfd(void) | |||
9657 | * _during_ shell execution, not only if it was set when | 9657 | * _during_ shell execution, not only if it was set when |
9658 | * shell was started. Therefore, re-check LANG every time: | 9658 | * shell was started. Therefore, re-check LANG every time: |
9659 | */ | 9659 | */ |
9660 | reinit_unicode(lookupvar("LANG")); | 9660 | { |
9661 | const char *s = lookupvar("LC_ALL"); | ||
9662 | if (!s) s = lookupvar("LANG"); | ||
9663 | reinit_unicode(s); | ||
9664 | } | ||
9661 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout); | 9665 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout); |
9662 | if (nr == 0) { | 9666 | if (nr == 0) { |
9663 | /* Ctrl+C pressed */ | 9667 | /* Ctrl+C pressed */ |