From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23383 invoked by alias); 8 Sep 2012 19:17:04 -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: 17236 Received: (qmail 28739 invoked from network); 8 Sep 2012 19:17: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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 209.85.214.171 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding :x-gm-message-state; bh=p13dua6nKcdk+qkzBnEnGBrjMKr2eC3Bm73bJFDr1BI=; b=bjH9zkVB1+ryh1TMf6zakBcUogsMTOuYJ4qUss3Shbc5wpmXMPPGimd222Q/kHtTJg qtUsKYZkU9MO3I79BOlf8stX960dg7mAe8lPJs18KaZ5Nw4ikPoiijeFc3XhFXJ3rwQ9 6ctxo+DIhm2/BVrSGd/KYIXZL/yswds/6ZGdaIB0L/I1F82qd2KEt3Gl00QX/pzT9PqQ cpYtxr7qVb5wVRlVCGqSxCOTZNjzDmq9XfKbGZMYivcromu0x+PBsFOTi2JuMFWEL0P6 p6fD+MJzmQV6EGnwJ9gf328B0vxLpGa00eU9SyKfy5LsWdCZgQSP0BAev8Nf73GgaS5W 9gow== MIME-Version: 1.0 X-Originating-IP: [86.6.16.18] In-Reply-To: References: <504A24BE.3090904@sharpsaw.org> Date: Sat, 8 Sep 2012 20:16:58 +0100 Message-ID: Subject: Re: Encoding bug? From: Peter Stephenson To: zsh-users@zsh.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkBQdiSow/eqDG25E7zpEk0MXx+MIe8PemOOzh2UIwI4XxX7EB9rLknHBZaCEpwXxXn4vag > echo e=E9=E0e # r prints garbage Sorry if this gets screwed up, I'm using webmail on the other laptop at the moment. Index: Src/builtin.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D=3D 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