From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27789 invoked by alias); 15 Feb 2012 14:56:27 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30230 Received: (qmail 8576 invoked from network); 15 Feb 2012 14:56:22 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Wed, 15 Feb 2012 15:56:19 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: printf %s in UTF-8 is not always POSIX-compliant Message-ID: <20120215145619.GF19525@xvii.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20120215021519.GA19525@xvii.vinc17.org> <120215001413.ZM22585@torch.brasslantern.com> <32370.1329316935@thecus.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <32370.1329316935@thecus.kiddle.eu> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6201-vl-r48020 (2011-12-20) On 2012-02-15 15:42:15 +0100, Oliver Kiddle wrote: > Bart wrote: > > Am I understanding correctly that the intent here is that ?? is a two- > > byte character so %2s should print the two literal bytes, rather than > > print the single logical character in a field two logical characters > > wide? > > That's correct. The POSIX definition uses bytes. For multibyte > behaviour, there is an L modifier. I don't really see the sense in it > myself: I don't want to write low-level stuff in the shell. I think that's for consistency with C. Also, the shell could then be used as a front-end to test string-related things. > Frank Terbeck wrote: > > Frankly, that would be the vendor's fault then. There are many *MANY* > > ksh implementations, that make for a reasonable link target (ksh93, > > pdksh or mksh - to name just a few). Zsh is not one of them. > > The fact that zsh is far from a perfect emulation doesn't stop it from > being useful. I don't necessarily want to install a separate ksh package > and zsh will run ksh scripts at least as well as pdksh. But then the emulation should be correct. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)