summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko2013-07-02 17:30:23 +0200
committerDenys Vlasenko2013-07-02 17:30:23 +0200
commit3e7ecb179b193bf17323c975890eed1d025f7e4c (patch)
tree99b869b4f6fa759aacb2c8e12464797c9e930a3d /shell/ash.c
parentea267d518ff55517e174b9e8514fc521e4a3b41e (diff)
downloadbusybox-3e7ecb179b193bf17323c975890eed1d025f7e4c.zip
busybox-3e7ecb179b193bf17323c975890eed1d025f7e4c.tar.gz
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 6af14f5..90f2224 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -9657,7 +9657,11 @@ preadfd(void)
* _during_ shell execution, not only if it was set when
* shell was started. Therefore, re-check LANG every time:
*/
- reinit_unicode(lookupvar("LANG"));
+ {
+ const char *s = lookupvar("LC_ALL");
+ if (!s) s = lookupvar("LANG");
+ reinit_unicode(s);
+ }
nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout);
if (nr == 0) {
/* Ctrl+C pressed */