From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13827 invoked by alias); 28 Apr 2017 15:27:24 -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: 41028 Received: (qmail 25989 invoked from network); 28 Apr 2017 15:27:24 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(85.128.245.120):SA:0(0.0/5.0):. Processed in 2.013559 secs); 28 Apr 2017 15:27:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at zdharma.org does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new using ClamAV (21) Date: Fri, 28 Apr 2017 17:27:16 +0200 From: Sebastian Gniazdowski To: zsh-workers@zsh.org, Peter Stephenson Message-ID: In-Reply-To: <20170428154135.2e2b5626@pwslap01u.europe.root.pri> References: <20170428124439.73447db2@pwslap01u.europe.root.pri> <20170428141650.7ed174d6@pwslap01u.europe.root.pri> <20170428154135.2e2b5626@pwslap01u.europe.root.pri> Subject: Re: Cannot paste unicode <0221>, <0234> - <024f> X-Mailer: Airmail (231) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 28 kwietnia 2017 at 16:42:17, Peter Stephenson (p.stephenson=40samsung= .com) wrote: > It might be possible to rely *only* on wcwidth() in cases where we're > using a replacement=3F Does anyone from the Apple world have any > opinions=3F > =20 > pws > =20 > diff --git a/Src/Zle/zle=5Frefresh.c b/Src/Zle/zle=5Frefresh.c I've checked the patch, no luck, but I knew what to track, so I've added:= =C2=A0 =C2=A0 fprintf( stderr, =22Path 1, char/string: %S=5Cn=22, t ); and =C2=A0 =C2=A0 fprintf( stderr, =22Path 3, char/string: %S, iswprint:%d, w= cwidth: %d=5Cn=22, t, iswprint(*t), WCWIDTH(*t)); for printable / unprintable if-paths, and the result is: Path 1, char/string: =C8=AF=C8=B0=C8=B1=C8=B2=C8=B3=C8=B4=C8=B5=C8=B6=C8=B7= =C8=B8=C8=B9 Path 1, char/string: =C8=B0=C8=B1=C8=B2=C8=B3=C8=B4=C8=B5=C8=B6=C8=B7=C8=B8= =C8=B9 Path 1, char/string: =C8=B1=C8=B2=C8=B3=C8=B4=C8=B5=C8=B6=C8=B7=C8=B8=C8=B9= Path 1, char/string: =C8=B2=C8=B3=C8=B4=C8=B5=C8=B6=C8=B7=C8=B8=C8=B9 Path 1, char/string: =C8=B3=C8=B4=C8=B5=C8=B6=C8=B7=C8=B8=C8=B9 Path 3, char/string: =C8=B4=C8=B5=C8=B6=C8=B7=C8=B8=C8=B9, iswprint:0, wc= width: -1 Path 3, char/string: =C8=B5=C8=B6=C8=B7=C8=B8=C8=B9, iswprint:0, wcwidth:= -1 Path 3, char/string: =C8=B6=C8=B7=C8=B8=C8=B9, iswprint:0, wcwidth: -1 Path 3, char/string: =C8=B7=C8=B8=C8=B9, iswprint:0, wcwidth: -1 Path 3, char/string: =C8=B8=C8=B9, iswprint:0, wcwidth: -1 Path 3, char/string: =C8=B9, iswprint:0, wcwidth: -1 What's interesting, once or twice the print looked like following (recomp= ile fixed this): Path 1, char/string: =C8=AF=C8=B0=C8=B1=C8=B2=C8=B3=C8=B4=C8=B5=C8=B6=C8=B7= =C8=B8=C8=B9i=E2=B1=81 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=90=C3=8DA=E4=B0=82=D3=83= =E0=A2=91=E0=A0=B1=E4=99=81=E6=80=B2=E0=BD=91=E0=BE=B7=C4=9D=C2=B2=C5=A9=C7= =9D Path 1, char/string: =C8=B0=C8=B1=C8=B2=C8=B3=C8=B4=C8=B5=C8=B6=C8=B7=C8=B8= =C8=B9i=E2=B1=81 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=90=C3=8DA=E4=B0=82=D3=83= =E0=A2=91=E0=A0=B1=E4=99=81=E6=80=B2=E0=BD=91=E0=BE=B7=C4=9D=C2=B2=C5=A9=C7= =9D Path 1, char/string: =C8=B1=C8=B2=C8=B3=C8=B4=C8=B5=C8=B6=C8=B7=C8=B8=C8=B9= i=E2=B1=81 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=90=C3=8DA=E4=B0=82=D3=83=E0=A2= =91=E0=A0=B1=E4=99=81=E6=80=B2=E0=BD=91=E0=BE=B7=C4=9D=C2=B2=C5=A9=C7=9D ... like if printf() wasn't sure itself should %S print those characters corr= ectly or not. That said, vim or mentioned bash somehow manage this, just = as a reference point if stdlib is broken or not(-really). --=C2=A0 Sebastian Gniazdowski