From c3e39a58b4c8927b08860e6bd6e4b05fc176e38e Mon Sep 17 00:00:00 2001 From: Alexey Gladkov Date: Thu, 24 Feb 2011 13:42:08 +0300 Subject: [PATCH] [BUILTIN] Fix corruption of reads with byte 0x81 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starting with 55c46b commit the dash began to remove the CTLESC bytes ('\x81') from readed sequence. This leads to breakage of some UTF8 characters. This commit removes the code to remove the CTLESC bytes and similar to f8231a. Testcase: $ /usr/bin/printf '[\u0441]\n' [с] $ /usr/bin/printf '[\u0441]\n' |dash -c 'read c; printf "%s\n" "$c"' [Ñ] Signed-off-by: Alexey Gladkov --- src/miscbltin.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/miscbltin.c b/src/miscbltin.c index 653c92f..4e88e8d 100644 --- a/src/miscbltin.c +++ b/src/miscbltin.c @@ -112,14 +112,12 @@ readcmd_handle_line(char *line, char **ap, size_t len) * will not modify the length of the string */ offset = sl->text - s; remainder = backup + offset; - rmescapes(remainder); setvar(*ap, remainder, 0); return; } /* set variable to field */ - rmescapes(sl->text); setvar(*ap, sl->text, 0); sl = sl->next; } while (*++ap); -- 1.7.3.5