zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: "C. v. Stuckrad" <stucki@math.fu-berlin.de>,
	Zsh workers list <zsh-workers@math.gatech.edu>
Subject: Re: 'LC_COLLATE=de ls [A-Z]*' expands to 'every file' including lowercase
Date: Mon, 6 Jul 1998 11:14:24 -0700	[thread overview]
Message-ID: <980706111424.ZM5205@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.GSO.3.95q.980706191531.6079J-100000@petzval>

On Jul 6,  7:28pm, C. v. Stuckrad wrote:
} Subject: 'LC_COLLATE=de ls [A-Z]*' expands to 'every file' including lower
}
} 
} Is it 'really correct', that after setting 'LANG=de' or 'LC_COLLATE=de'
} ranges of characters will no more be differentiate between uppercase
} and lowecase ? So 'rm [A-Z]' will remove not only 'FOO' but 'bar' too!

Ranges like [A-Z] are computed using strcoll() when it is available.  If
that collation function returns that "b" is greater than "A" and less
than "Z" then 'b' is considered to be in the range [A-Z].

It's entirely possible that setting LANG and/or LC_COLLATE to something
other than C or ASCII could cause sorting to become case-insensitive or
to mix the letters (e.g. AaBbCcDd...).  In the latter case, [A-Z] would
include 'a' through 'y' but not 'z', which is seriously confusing.

} Is this a bug ?  Or a feature I've not been warned of by the manuals.

I'd have to list it as the latter, but it sure creeps awfully close to
being a bug, because it's totally unexpected if you actually know about
the numeric values of your character set.

I'd vote in favor of removing HAVE_STRCOLL from matchonce() in glob.c.


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1998-07-06 20:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-06 17:28 C. v. Stuckrad
1998-07-06 18:14 ` Bart Schaefer [this message]
1998-07-07 15:30   ` C. v. Stuckrad
1998-07-08  6:40   ` Zoltan Hidvegi
1998-07-08 11:02     ` Bart Schaefer
1998-07-08 15:36       ` Zoltan Hidvegi
1998-07-08 17:24         ` Bart Schaefer
1998-07-08 19:35           ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=980706111424.ZM5205@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=stucki@math.fu-berlin.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).