From: Alexey Zinovyev <alzinovyev@gmail.com>
To: dash@vger.kernel.org
Subject: [PATCH] fix UTF-8 issues in read() builtin
Date: Wed, 8 Sep 2010 01:26:15 +0400 [thread overview]
Message-ID: <20100907212615.GA28796@3arch> (raw)
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
Hello, I think there is a bug in read() builtin.
$ cat test
echo 'ρ'|while read i; do echo $i; done
$ dash test
$ bash test
ρ
Same with some japanese symbols.
Looks like dash strips 0x81 byte.
[-- Attachment #2: dash-read-fix.patch --]
[-- Type: text/plain, Size: 378 bytes --]
diff --git a/src/miscbltin.c b/src/miscbltin.c
index 5ab1648..f8c5655 100644
--- a/src/miscbltin.c
+++ b/src/miscbltin.c
@@ -101,7 +101,6 @@ 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;
next reply other threads:[~2010-09-07 21:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 21:26 Alexey Zinovyev [this message]
2010-09-07 22:57 ` [PATCH] fix UTF-8 issues in read() builtin Jilles Tjoelker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100907212615.GA28796@3arch \
--to=alzinovyev@gmail.com \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.