Joshua Juran writes:
> Constructions like [A-Za-z] are non-portable to EBCDIC, since the
> alphabetic code points are non-contiguous.

They're also, astonishingly enough, non-portable to POSIXish systems with
ASCII-compatible character sets:

  $ echo z | env LANG=en_GB.iso-8859-1 grep '[A-Z]'
  $ echo z | env LANG=en_GB.utf-8      grep '[A-Z]'
  z

One or more of the following may be considered responsible:

  $ /lib/libc.so.* --version | head -1
  GNU C Library stable release version 2.3.2, by Roland McGrath et al.
  $ grep --version | head -1
  grep (GNU grep) 2.5.1

But I'm more inclined to lay the blame on the insanity of the POSIX
spec that requires obvious, reasonable constructions like this to
behave in such an unpredictable and obscure way.  Hate!

-- 
Aaron Crane ** http://aaroncrane.co.uk/

Reply via email to