From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27128 invoked from network); 5 Mar 2008 10:42:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Mar 2008 10:42:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 72797 invoked from network); 5 Mar 2008 10:42:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Mar 2008 10:42:37 -0000 Received: (qmail 7750 invoked by alias); 5 Mar 2008 10:42:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24681 Received: (qmail 7735 invoked from network); 5 Mar 2008 10:42:33 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 5 Mar 2008 10:42:33 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [85.115.41.190]) by bifrost.dotsrc.org (Postfix) with ESMTP id 056898028C67 for ; Wed, 5 Mar 2008 11:42:29 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly02g.srv.mailcontrol.com (MailControl) with ESMTP id m25AfVY7024239 for ; Wed, 5 Mar 2008 10:42:17 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 5 Mar 2008 10:41:49 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m25AfnEo031045 for ; Wed, 5 Mar 2008 10:41:49 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m25AfmUc031042 for ; Wed, 5 Mar 2008 10:41:49 GMT Message-Id: <200803051041.m25AfmUc031042@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: printf %s in UTF-8 is not POSIX-compliant In-reply-to: <20080305002721.GF15833@prunille.vinc17.org> References: <20080304012917.GA15833@prunille.vinc17.org> <200803040940.m249e7DC012517@news01.csr.com> <20080305002721.GF15833@prunille.vinc17.org> Comments: In-reply-to Vincent Lefevre message dated "Wed, 05 Mar 2008 01:27:21 +0100." Date: Wed, 05 Mar 2008 10:41:48 +0000 From: Peter Stephenson X-OriginalArrivalTime: 05 Mar 2008 10:41:49.0322 (UTC) FILETIME=[843EF6A0:01C87EAD] X-Scanned-By: MailControl A-08-00-04 (www.mailcontrol.com) on 10.71.0.112 X-Virus-Scanned: ClamAV 0.91.2/6137/Wed Mar 5 11:18:24 2008 on bifrost X-Virus-Status: Clean Vincent Lefevre wrote: > On 2008-03-04 09:40:07 +0000, Peter Stephenson wrote: > > That seems to me useless. > > But that what's POSIX requires (and this hasn't changed in the latest > draft). Also, there may be reasons (e.g. file formats with limited > field sizes). So, zsh should follow the specification, at least when > it emulates sh, since the user may write scripts based on it. There may be something we can do, but at the moment it looks more complicated than that. Emulations are tied to the behaviour of interactive shells, so although it's likely you do indeed want bog-standard byte oriented behaviour if the intention is to run a script as sh (POSIX mostly deals in the "portable character set", broadly ASCII so other multibyte effects are irrelevant and best turned off), it's much less clear that turning off MULTIBYTE for all forms of sh emulation is useful. In particular, "emulate sh" is the nearest we have to bash emulation and bash users are likely to expect multibyte characters to work naturally. Is it time to introduce a separate "bash" emulation (meaning smart, interactive shell not necessarily 100% POSIX compatible) and document that "sh" emulation is aimed at POSIX compatibility? "emulate bash" already works but is treated the same way as "emulate sh". -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070