Re: Strange range behavior in a case statement

From: William (Reply_at_NewsGroup.Please)
Date: 09/30/03


Date: Tue, 30 Sep 2003 11:18:20 -0500


"Stephane CHAZELAS" <stephane_chazelas@yahoo.fr> wrote in message
news:slrnbnj6kb.mm.stephane_chazelas@pcchazelas.free.fr...
> William wrote:
> [...]
> > case "$GP_CH" in [!!-~] ) break ;; esac # Problem area
> [...]
> > It's supposed to accept any character greater than a
> > space and less than a Del.
>
> That may be due to localization. Try to see if forcing
> LC_COLLATE to "C" or "POSIX" solves the problem.

Bingo! The linux machine in question had LC_COLLATE
set to en_us. Changed to 'C' it works fine. Thanks!

Any downside to setting that for this specific loop? Is there
a downside to setting it for the entire script - would it affect
echoed characters for example or does it apply only to
globbing ranges and other sequences? (A search turned up
a reference to LC_ALL that suggested it will override
LC_COLLATE in some cases unless it too is set to 'C' -
good or bad idea?)

Stranger in a strange locale -Wm



Relevant Pages

  • Re: OT- stolen quote
    ... by William Pierce of Georgia. ... He is about 50 years of age. ... *William Blount Mr. Blount is a character strongly marked for integrity ... He has been twice a Member of Congress, ...
    (alt.support.mult-sclerosis)
  • Re: Is this the REAL reason for the 7/23 production shut-down?
    ... the evil look alike sibling ... (no word on whether the character will be a twin, ... Let's face it...since William was BORING, ... TS is not leading man material and I don't think the guy can play the brother, uncle whatever any better than he could play William. ...
    (rec.arts.tv.soaps.cbs)
  • Re: Dungeon Crawl Stone Soup 0.3 release [Crawl]
    ... the string "Hello, William! ... How is work on Omega going?" ... then setting your character name to "William" on future ...
    (rec.games.roguelike.misc)
  • Re: Stephenie Mayer -- the next J. K. Rowling
    ... wdstarr@xxxxxxxxx (William December Starr) writes: ... A character who, in effect, lives in another world from that in ...
    (rec.arts.sf.written)
  • Re: There is a Santa Claus!
    ... >> the court-appointed lawyer, but eventually you have to take a case. ... William Shatner's ... >character was appointed, and took unusual action to evade representing ... Prev by Date: ...
    (rec.arts.sf.fandom)