bug-coreutils
[Top][All Lists]
Advanced

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

Re: uniq: missing option -W / --check-fields=N


From: Paul Eggert
Subject: Re: uniq: missing option -W / --check-fields=N
Date: Tue, 27 Jun 2006 10:11:44 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Pádraig Brady <address@hidden> writes:

> uniq can be efficient and assume LANG=C always as
> it need only care if adjacent items match or not.

I'm afraid it's not that simple.  In some locales it's possible that
two strings A and B can compare equal even though their bytes differ.
The C notation for this is (strcoll (A,B) == 0 && strcmp (A,B) != 0).

This point was addressed in IEEE Std 1003.1-2001/Cor 1-2002, item
XCU/TC1/D6/40, and it's why the current Posix spec says that the
behavior of uniq depends on LC_COLLATE.




reply via email to

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