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

Re: 8-bit parameter names?



Bart Schaefer wrote:
> Is it intentional that 8-bit characters can be used in parameter name
> identifiers, or is it a bug?

There's a weird assumption that 8-bit characters from 160 can be treated
as alphanumeric.   This doesn't really work for any character set I'm
aware of.

    for (t0 = 0240; t0 != 0400; t0++)
	typtab[t0] = IALPHA | IALNUM | IIDENT | IUSER | IWORD;

Arguably we could just delete that.  The internal tests ialpha and
ialnum are used very infrequently in cases where use of an 8-bit
character isn't likely---they are not used to replace isalpha() and
isalnum() in pattern matching.  I don't know what characters you can
have in user names, but it's only used to test what follows a ~.  iword
needs redoing completely for Unicode anyway; we need to base it on
WORDCHARS plus isalnum() or iswalnum, a fixed table entry isn't good
enough.  (The [[:WORD:]] test I just added suffers from this too, but it
is at least consistent with zle which is its main purpose.)

-- 
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 email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



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