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

Re: changing ZLE_CHAR_T?

Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx> wrote:
> I almost changed icntrl() too, but I noticed that zsh is currently
> treating chars 128 - 159 as control characters (something that the
> normal iscntrl() function does not do), so I left it alone for now.
> This does point out an inconsistency in multibyte mode: the ZC_icntrl()
> macro (which currently uses iswcntrl()) will not return true for these
> extended chars.  Do we need this?

I think we probably just need to let the old logic largely do what it
always did to avoid surprises (if the same thing can be done better by
making the code more consistent that's fine), and have the new code use the
system macros wherever possible.

The old code made wild guesses on the assumption that it couldn't rely on
system tests, which was probably true when it was originally written.
Characters 160 on are marked as alphanumeric for the same reason.  I don't
see any point being too clever with it now; it might as well stay
consistent with the way it's always been.

Now we have the ability to do things properly in the new code we should do
that wherever possible.  Consistency with the old logic isn't really a big
issue for once---proper multibyte support is bound to do a lot of things

We will gradually want to extend the use of iswalnum() etc, which might
well mean the current set of i-macros is gradually phased out of the
multibyte version.

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

This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

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