Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: The "set" utility outputs binary data



On Thu, 3 Dec 2015 14:25:33 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Thu, 3 Dec 2015 15:05:58 +0100
> Vincent Lefevre <vincent@xxxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author