From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25431 invoked by alias); 8 Sep 2012 19:35:15 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17237 Received: (qmail 24561 invoked from network); 8 Sep 2012 19:35:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Sat, 8 Sep 2012 15:34:32 -0400 (EDT) From: "Benjamin R. Haskell" To: Peter Stephenson cc: zsh-users@zsh.org Subject: Re: Encoding bug? In-Reply-To: Message-ID: References: <504A24BE.3090904@sharpsaw.org> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463810530-569026338-1347132897=:24430" ---1463810530-569026338-1347132897=:24430 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Sat, 8 Sep 2012, Peter Stephenson wrote: >> echo eéàe # r prints garbage > > Sorry if this gets screwed up, I'm using webmail on the other laptop > at the moment. Verified that this solves the problem. Here's your patch against the git repo. (Also hoping it solves the tabs-vs.-spaces discrepancies probably caused by webmail.) Is the git repo the official source now? I thought that was another 5.0.0 goal/plan. Best, Ben --- Src/builtin.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Src/builtin.c b/Src/builtin.c index 3925edd..d8493bb 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1727,8 +1727,12 @@ fclist(FILE *f, Options ops, zlong first, zlong last, if (f == stdout) { nicezputs(s, f); putc('\n', f); - } else - fprintf(f, "%s\n", s); + } else { + int len; + unmetafy(s, &len); + fwrite(s, 1, len, f); + putc('\n', f); + } } /* move on to the next history line, or quit the loop */ if (first < last) { -- 1.7.7 ---1463810530-569026338-1347132897=:24430--