From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19013 invoked by alias); 10 Sep 2015 19:53:14 -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: 36484 Received: (qmail 2848 invoked from network); 10 Sep 2015 19:53:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=AJvf2gUA c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=jKfzJPDBUO1HDrRLQusA:9 a=CjuIK1q_8ugA:10 Date: Thu, 10 Sep 2015 20:53:07 +0100 From: Peter Stephenson To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: Pasting UTF-8 characters with bracketed-paste-magic seems broken in 5.1 Message-ID: <20150910205307.4d3c8931@ntlworld.com> In-Reply-To: <150910122953.ZM3829@torch.brasslantern.com> References: <20150906155751.GD3721@sym.noone.org> <150910073920.ZM21998@torch.brasslantern.com> <20150910145714.GO3721@sym.noone.org> <150910084516.ZM22892@torch.brasslantern.com> <20150910170705.0fbeb302@pwslap01u.europe.root.pri> <150910091649.ZM3715@torch.brasslantern.com> <20150910172840.0a1899f4@pwslap01u.europe.root.pri> <150910122055.ZM3818@torch.brasslantern.com> <150910122953.ZM3829@torch.brasslantern.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 10 Sep 2015 12:29:53 -0700 Bart Schaefer wrote: > Oh, but "read -k" is always going to read from the terminal? It does > not use the "zle -U" pushback? In which case we'd have to loop on > "zle .read-command", even with the [[:INCOMPLETE:]] pattern. > > Urk. I think read-command is going to have to know multibyte ...? I don't think that's a problem. The whole shell is built around the requirement that multibyte characters are an 8-bit extension of ASCII, else it would need rewriting from the ground up. So, even if it's not UTF-8, the chraracter set needs to have the property that bytes in a multibyte character are not ASCII characters, or to put it another way every byte is equivalent as far as .read-command is concerned. So I think the code I posted using [[:INCOMPLETE:]] should be the core of a reasonable solution. Note that if we do upgrade read-command, it's future proof, since then we never get something starting with [[:INCOMPLETE:]] (though it may in principle start with [[:INVALID;]]). pws