Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: More comments in ztst files
- X-seq: zsh-workers 13745
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: More comments in ztst files
- Date: Sun, 25 Mar 2001 00:19:52 +0000
- In-reply-to: ""Bart Schaefer""'s message of "Sat, 24 Mar 2001 23:57:14 GMT." <1010324235714.ZM31898@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Bart wrote:
> # it doesn't *say* these are case-insensitive without i...
> # I think this is a bug.
>
> Where "these" are ${(o)...} and ${(O)...}. The manual does in fact say
> that (i) means sort case-insensitively with (o). By implication, sorting
> should be case-sensitive without it, right? The results seem to be in
> case-sensitive order, so I'm not sure what was up with this comment.
There was some argy bargy about the effect of locales, which caused some
confusion about this: in some locales (even English language ones) the
sorting was automatically case-insensitive. We now reset LC_ALL to C in
ztst.zsh. But this doesn't seem to be enough.
- I I be could programme recorded that watching
be could I I programme recorded that watching
! watching that recorded programme could be I I
watching that recorded programme I I could be
--- 1,4 ----
be could I I programme recorded that watching
! be could I I programme recorded that watching
! watching that recorded programme I I could be
watching that recorded programme I I could be
This is because Chmouel and company have done the job more thoroughly this
time (Mandrake 7.2):
exported LC_COLLATE=en_GB # form orderly bus queues
exported LC_CTYPE=en_GB
exported LC_MESSAGES=en_GB # don't say `have a nice day'
exported LC_MONETARY=en_GB # devalue everything in sight
exported LC_NUMERIC=en_GB
exported LC_TIME=en_GB
The patch below fixes LC_COLLATE, too.
> Peter must have really been pining for William Dalrymple at this point.
Oh, dear. I don't think I've ever really read what I wrote before.
Index: Test/ztst.zsh
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/ztst.zsh,v
retrieving revision 1.5
diff -u -r1.5 ztst.zsh
--- Test/ztst.zsh 2000/06/07 09:02:24 1.5
+++ Test/ztst.zsh 2001/03/25 00:16:09
@@ -25,6 +25,7 @@
# Ensure the locale does not screw up sorting. Don't supply a locale
# unless there's one set, to minimise problems.
[[ -n $LC_ALL ]] && LC_ALL=C
+[[ -n $LC_COLLATE ]] && LC_COLLATE=C
[[ -n $LANG ]] && LANG=C
# Set the module load path to correspond to this build of zsh.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author