Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Encoding bug?



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


Messages sorted by: Reverse Date, Date, Thread, Author