On 08/01/2012 04:48 AM, Pierre-Jean wrote: > Jim Meyering <[email protected]> wrote: > >> Pierre-Jean wrote: > >>> I'm trying to sort a file containing accents and numbers, >>> but can't find a way to do this correctly: > > >> The trick is to specify sorting with "-f" for the first column >> and "-V" for the second. Then it does what you seem to want: > > This is better, but still not perfect: "é 9" should be > before "e 10", like "E 9" is before "e 10", as in a > dictionnary, where "éa" is before "eb". That means that > e=E=é=è=É=È if something after makes a différence.
Are you using 'sort --debug' while experimenting with this? Also be open to the idea that it might be a bug in your locale definition, where the rules picked by your choice of LC_COLLATE could be tuned to better give you the sorting you want. -- Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
