From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23667 invoked from network); 10 Dec 2006 21:35:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Dec 2006 21:35:32 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 13298 invoked from network); 10 Dec 2006 21:35:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Dec 2006 21:35:26 -0000 Received: (qmail 11473 invoked by alias); 10 Dec 2006 21:35:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23042 Received: (qmail 11462 invoked from network); 10 Dec 2006 21:35:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 10 Dec 2006 21:35:23 -0000 Received: (qmail 13021 invoked from network); 10 Dec 2006 21:35:23 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 10 Dec 2006 21:35:18 -0000 Received: from torch.brasslantern.com ([71.116.86.88]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JA200ISWUMD61K7@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 10 Dec 2006 15:35:02 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id kBALZ0iE016554 for ; Sun, 10 Dec 2006 13:35:01 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id kBALZ0n2016553 for zsh-workers@sunsite.dk; Sun, 10 Dec 2006 13:35:00 -0800 Date: Sun, 10 Dec 2006 13:34:59 -0800 From: Bart Schaefer Subject: Multibyte output confuses "print -c" ? To: zsh-workers@sunsite.dk Message-id: <061210133500.ZM16552@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii I'm not entirely sure what's going on here, but: zsh% autoload define-composed-chars zsh% define-composed-chars zsh% print -C 10 -- \<'\U'${(l.8..0.)^${(s. .)zsh_accented_chars}}\> Note that the columns are not all the same width and in many cases the closing angle bracket does not appear. I also get exactly one "zsh: character not in range" error, see more on that below. Comparing the output of "print -C 1" and "print -l" on that same expansion, there appears first to be a problem with columnation of strings containing a nul byte. zsh% print -c '<\U0000000T>' < zsh% print '<\U0000000T>' | cat -v <^@T> Digging a bit deeper, I find there are also some embedded newlines in the values of $zsh_accented_chars that I don't think should be there: <000448\nd> <00042B\na> <000044B\n> So that indicates a problem in define-composed-chars. However, there still remain a number of cases where print fails with either -c or -l. Digging still further, I find that if I individually print each of the failing values, every one of them produces "zsh: character not in range" -- but if I print them, say, in a "for x in ..." loop, the only every alternate one of them gives the error, and if I print multiple of them in the same single print statement I get the error only once. The latter sort of makes sense but the loop behavior must be wrong; something is not being reset in the interpolation for '\U...'? --