[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: egrep oddity



On Sunday 05 February 2012 19:55:48 Bob Proulx wrote:
> Neal Murphy wrote:
> > For quite some time now, I've been getting peeved with egrep not
> > doing what it should.
> 
> You don't like it and I don't like it but the powers that be have
> decided that within a locale, within libc, character collation
> sequences will be dictionary ordering where case is folded and
> punctuation is ignored.  They failed to see how this would negatively
> impact almost everything.  Creeping features.
> 
> And because punctuation is ignored it causes a lot of problems with
> utilities such as sort.  You didn't have to say LC_ALL=C for the first
> thirty years.  But you do now.  (Or at least since the mid 1990's.)
> In almost all scripts dealing with sort ordering you will find it
> necessary to set LC_ALL=C to get expected results.  I have been a
> rather outspoken critic of this design decision on other mailing
> lists.

Thank you! I suppose it had to be done, to handle non-English languages, but 
it's really a Royal PITA. Your suggestion as to LANG and LC_COLLATE_C works 
well enough.

Now if I can just remember this in a year or two when I have to reinstall. :)

N


Reply to: