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

Re: Encoding bug?



> echo eéàe # r prints garbage

Sorry if this gets screwed up, I'm using webmail on the other laptop
at the moment.

Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.261
diff -u -r1.261 builtin.c
--- Src/builtin.c	21 Aug 2012 18:03:03 -0000	1.261
+++ Src/builtin.c	8 Sep 2012 19:12:38 -0000
@@ -1727,8 +1727,12 @@
 	    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) {

pws



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