From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8887 invoked from network); 8 May 2009 14:28:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) 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.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 May 2009 14:28:21 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 81087 invoked from network); 8 May 2009 14:28:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 May 2009 14:28:16 -0000 Received: (qmail 14088 invoked by alias); 8 May 2009 14:28:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26953 Received: (qmail 14079 invoked from network); 8 May 2009 14:28:11 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 8 May 2009 14:28:11 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [208.87.233.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id E856182D4B6B for ; Fri, 8 May 2009 16:28:06 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly29g.srv.mailcontrol.com (MailControl) with ESMTP id n48ERTtn018827 for ; Fri, 8 May 2009 15:28:01 +0100 Received: from news01 ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Fri, 8 May 2009 15:23:30 +0100 Date: Fri, 8 May 2009 15:23:30 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: D07multibyte.ztst failure on HP-UX 11.11 Message-ID: <20090508152330.75dcbd11@news01> In-Reply-To: <20090507220819.GA13920@svalbard> References: <20090501145253.GA5070@svalbard> <200905011518.n41FIlHi005089@news01.csr.com> <20090505193931.GA2944@svalbard> <20090506202206.63bc26b0@pws-pc> <20090506215026.GA5565@otaku> <20090507163819.1932f06e@news01> <20090507170219.46d636e0@news01> <20090507220819.GA13920@svalbard> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 08 May 2009 14:23:30.0744 (UTC) FILETIME=[8FB9A380:01C9CFE8] X-Scanned-By: MailControl A-06-00-00 (www.mailcontrol.com) on 10.71.0.139 X-Virus-Scanned: ClamAV 0.92.1/9347/Fri May 8 07:10:18 2009 on bifrost X-Virus-Status: Clean On Thu, 7 May 2009 22:08:19 +0000 Paul Ackersviller wrote: > > This means your test still fails, however. I'm not sure what to do abo= ut > > this since clearly the test *does* fail; you don't get a valid characte= r or > > an error. Since character set conversion isn't working on your system = (as > > evinced by the result of not setting the C locale), I suppose we could = test > > that and if so skip the test? >=20 > Sounds like about the best that can be done under the circumstances. OK, let's do the following. It prints a message but avoids looking like a shell bug if character set conversion doesn't work in a simple case. Index: Test/D07multibyte.ztst =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/Test/D07multibyte.ztst,v retrieving revision 1.32 diff -u -r1.32 D07multibyte.ztst --- Test/D07multibyte.ztst 7 May 2009 16:04:42 -0000 1.32 +++ Test/D07multibyte.ztst 8 May 2009 14:19:38 -0000 @@ -378,17 +378,25 @@ >X$'\300'Y$'\a'Z$'\177'T =20 # This also isn't strictly multibyte and is here to reduce the -# likelihood of a "can't do character set conversion" error. - testfn() { (LC_ALL=3DC; print $'\u00e9') } - repeat 4 testfn 2>&1 | while read line; do - if [[ $line =3D *"character not in range"* ]]; then - print OK - elif [[ $line =3D "?" ]]; then - print OK - else - print Failed: no error message and no question mark - fi - done +# likelihood of a "cannot do character set conversion" error. + (print $'\u00e9') 2>&1 | read + if [[ $REPLY !=3D =C3=A9 ]]; then + print "warning: your system can't do simple Unicode conversion." >&$ZT= ST_fd + print "Check you have a correctly installed iconv library." >&$ZTST_fd + # cheat + repeat 4 print OK + else + testfn() { (LC_ALL=3DC; print $'\u00e9') } + repeat 4 testfn 2>&1 | while read line; do + if [[ $line =3D *"character not in range"* ]]; then + print OK + elif [[ $line =3D "?" ]]; then + print OK + else + print Failed: no error message and no question mark + fi + done + fi true 0:error handling in Unicode quoting >OK --=20 Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070