Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] [[:blank:]] only matches on SPC and TAB
Note a "theoretical" problem with not doing iswblank() is that
[[:blank:]] is often used to parse the output of some commands.
When POSIX specifies the output of a command (generally only in
the POSIX locale) and that output has whitespace separated fields
(like in the output of id, ls -l, wc...) the separators are one
or more "blanks".
So we need to be able to match *those* "blanks" which are the
POSIX blanks.
Now in practice, I don't know of any current implementation of
any utility that would use anything but SPC or TAB in any
locale, so it's only a "theoretical" point.
Note that by some reading of the spec, and bash and yash have
made such readings, when the spec says tokens are delimited by
blanks, that's any blank in the locale.
$ yash -c $'echo\u2006test'
test
In the case of bash, that only works "properly" with single-byte
characters.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author