zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Stucki <stucki@math.fu-berlin.de>, zsh-users@math.gatech.edu
Subject: Re: How to NOT allow LC_COLLATE to corrupt globbing ???
Date: Mon, 7 Dec 1998 08:16:03 -0800	[thread overview]
Message-ID: <981207081603.ZM989@candle.brasslantern.com> (raw)
In-Reply-To: <19981207144447.A13964@math.fu-berlin.de>

On Dec 7,  2:44pm, Stucki wrote:
} Subject: How to NOT allow LC_COLLATE to corrupt globbing ???
}
} Once again I nearly was bitten by an Environment containing:
} export LC_COLLATE=de
} 
} Then doing 'rm *[A-Z]*' on a Sun is really doing 'rm *'
} as there is no difference between upper and lower case
} in the german collating sequence.

When we discussed this earlier this year, Zoltan concluded in

http://www.zsh.org/mla/workers/1998/msg00551.html

that GNU regexp and bash don't use the collating sequence in character
ranges, and that it's therefore probably OK for zsh not to either.  Hey,
Tim, any chance you can try ksh in some other language environment to
see if it collates character ranges?

} So now I'd like to ***compile*** my zsh in a way that makes sure
} I *always* use the standard collating sequence like LC_COLLATE=C
} (or may be LC_COLLATE=us).
} 
} (changing 'config.h' *after* running 'configure'
}  to contain '#define HAVE_LOCALE_H 0' did *not* help!)

That's because glob.c calls strcoll() if HAVE_STRCOLL is defined, whether
or not locale.h is present or any other locale macros are defined.  So if
the library strcoll() believes LC_COLLATE, you're going to get collating
behavior.  Contrariwise, if you #undef HAVE_STRCOLL you'll get the rest
of the locale-specific behavior without getting collating sequences.

There are other places where HAVE_STRCOLL is used and might be desirable,
though, so it would really be best to make a decision on glob.c and either
remove the HAVE_STRCOLL code or make it part of the appropriate emulation.

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


  parent reply	other threads:[~1998-12-07 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-07 13:44 Stucki
1998-12-07 13:57 ` Peter Stephenson
1998-12-07 16:16 ` Bart Schaefer [this message]
1998-12-07 16:44   ` Bruce Stephens

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=981207081603.ZM989@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=stucki@math.fu-berlin.de \
    --cc=zsh-users@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).