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

Re: Quoting problem and crashes with ${(#)var}



> } (However, the ZLE function insert-unicode-char correctly
> } shows it as control character, ^ followed by A with a grave accent.)
> 
> That's what I expected ${(V)x} to do, but instead it displays it as a
> \u escape.
>...
> I'm asking for two things:
> 
> (1) when "character not in range" we don't treat it as a fatal error
> and bail out of the whole surrounding loop; and
> 
> (2) regardless of the locale, single-byte values should always be
> convertible to something "viewable", either \u00xy or \M-c.
> 
> There might be cases where "character not in range" is a fatal error,
> but this doesn't seem as though it ought to be one of them.

OK, I misinterpreted... I've certainly no objection to cleverer use of
escape codes for things that can't otherwise be output (where we can
test this, obviously).  I thought you were saying "treat this as a
directly printable character" in both cases.

Passing the character through the appropriate version of nicechar()
ought to help.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



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