From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14409 invoked by alias); 4 Dec 2015 14:29:08 -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: 37304 Received: (qmail 13885 invoked from network); 4 Dec 2015 14:29:06 -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-AuditID: cbfec7f4-f79026d00000418a-05-5661a32fef61 Date: Fri, 04 Dec 2015 14:29:00 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: The "set" utility outputs binary data Message-id: <20151204142900.0c035c6a@pwslap01u.europe.root.pri> In-reply-to: <20151203142533.5aae65f6@pwslap01u.europe.root.pri> References: <20151203140558.GA17469@zira.vinc17.org> <20151203142533.5aae65f6@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPLMWRmVeSWpSXmKPExsVy+t/xK7r6ixPDDE6sY7M42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGVsX3mIsWMResbjnMWsD42vWLkZODgkBE4mNv7exQdhiEhfu rQezhQSWMkr0HhTuYuQCsmcwSUy+/JQFwjnNKLHxwg0o5wyjxKfvp9hBWlgEVCXuPL8J1s4m YCgxddNsRhBbREBc4uza8ywgtrCAkcSRzYvBVvMK2EscufgArIZTwEHi+o/lQDYH0NAsiXeX rEDC/AL6Elf/fmKCuM5eYuaVM4wQrYISPybfAxvJLKAlsXlbEyuELS+xec1bZogP1CVu3N3N PoFReBaSlllIWmYhaVnAyLyKUTS1NLmgOCk911CvODG3uDQvXS85P3cTIySYv+xgXHzM6hCj AAejEg8vw6aEMCHWxLLiytxDjBIczEoivMwyiWFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeefu eh8iJJCeWJKanZpakFoEk2Xi4JRqYCw+u4Pj3/6Iv+pvz6+46aPiN9UtJijNJS9id9HW9gdm vkYrXhltvlg3OWCCpRHvtcYvOz3XfIubHH3QkH1fNPf+q2rT7m48LJ+bs/uo9rpCrq0HpZ8f YHjKHvIjO9LaN+DeduGCx5HV22dcuB2xbI7jz6NbWGcvuDhZxCdi891l68wNJjpuSypUYinO SDTUYi4qTgQAwSZT5WICAAA= On Thu, 3 Dec 2015 14:25:33 +0000 Peter Stephenson wrote: > On Thu, 3 Dec 2015 15:05:58 +0100 > Vincent Lefevre wrote: > > I think that by default, "set" should quote non-printable characters > > (including invalid byte sequences, I assume). > > It already does some sort of quoting, in fact. It's probably just a > historical artifact that it doesn't do the latest and greatest sort. It looks like the strategy would be be to upgrade quotedzputs() to interact better with nicezputs() and nicechar(). The code that's not there at the moment is to pick the right sort of quotes, and you only know that after the event at the moment, so the interface to those two needs expanding. I'd propose not bothering to do this in the case where multibyte mode isn't available (i.e is not even compiled in). It's not useful enough and wouldn't get much testing. pws