From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5533 invoked from network); 4 Mar 2008 01:37:29 -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.6 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; 4 Mar 2008 01:37:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 65651 invoked from network); 4 Mar 2008 01:37:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Mar 2008 01:37:23 -0000 Received: (qmail 25923 invoked by alias); 4 Mar 2008 01:37:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24677 Received: (qmail 25911 invoked from network); 4 Mar 2008 01:37:20 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 4 Mar 2008 01:37:20 -0000 Received: from prunille.vinc17.org (vinc17.pck.nerim.net [213.41.242.187]) by bifrost.dotsrc.org (Postfix) with ESMTP id E0C6D8028C53 for ; Tue, 4 Mar 2008 02:37:17 +0100 (CET) Received: by prunille.vinc17.org (Postfix, from userid 501) id 637DF2082720; Tue, 4 Mar 2008 02:37:17 +0100 (CET) Date: Tue, 4 Mar 2008 02:37:17 +0100 From: Vincent Lefevre To: zsh-workers@sunsite.dk Subject: Re: printf %s in UTF-8 is not POSIX-compliant Message-ID: <20080304013717.GB15833@prunille.vinc17.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <20080304012917.GA15833@prunille.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080304012917.GA15833@prunille.vinc17.org> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.17-vl-r21552 (2008-03-02) X-Virus-Scanned: ClamAV 0.91.2/6097/Mon Mar 3 21:58:29 2008 on bifrost X-Virus-Status: Clean I mixed up the field width and the precision, but there's the same problem: vin% emulate sh vin% printf ".%.2s.\n" éabc .éa. vin% /usr/bin/printf ".%.2s.\n" éabc .é. vin% and POSIX says: field width An optional string of decimal digits to specify a minimum field width. For an output field, if the converted value has fewer bytes than the field width, [...] ^^^^^ -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)