sed not working

Giorgos Keramidas keramida at freebsd.org
Sat Sep 3 21:16:01 PDT 2005


On 2005-09-03 14:17, Rein Kadastik <wigry at uninet.ee> wrote:
> Rein Kadastik wrote:
> >Well I have one guess here. In estonian alphabet, the z comes
> >immediately after s and before t. So as the regex orders [a-z] the
> >characters t, u, v, w, x, y are left out
> >
> >How to order the sed to use english alphabet?
>
> Well, My guess was right. I have a following line in the /etc/profile:
>
> export LANG=et_EE.ISO8859-15
>
> After I expoerted LANG=en_US.ISO8859-1, the sed started to work.
>
> I did not thought that LANG parameter will also alter the alfabet and
> therefore the expression [a-z] does not cover the full alphabet anymore.

By using a character class:

	[[:alpha:]]

AFAIK, if you are using non-English locales, there's no guarantee that
[a-z] will be the entire set of lowercase letters, or that it will only
include lowercase letters, for that matter.



More information about the freebsd-hackers mailing list