bug-grep
[Top][All Lists]
Advanced

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

Re: Interaction of -i with square brackets


From: Charles Levert
Subject: Re: Interaction of -i with square brackets
Date: Wed, 16 Nov 2005 22:54:33 -0500
User-agent: Mutt/1.4.1i

* On Wednesday 2005-11-16 at 16:39:36 -0800, Geoff Kuenning wrote:
> > The root user is probably using a different locale.
> 
> Bingo.  That was (is) the problem.  Thanks.
> 
> But I don't understand why the locale should matter when I'm only
> grepping for 7-bit characters.

Because neither grep nor the regex/C library know
in advance that you are, unless you declare it
through the locale mechanism.  Both pattern
and file data matter, and file data is (are?)
discovered as it is processed.  (I.e., there is
only one pass.)  Different code paths are taken
in various places, according to the locale,
or more precisely, whether the current maximum
octet length for characters under it is 1 or
something greater than 1.  One specific code
path may have bugs that are unique to it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]