Sorting items by names do not work properly

Bug #1037256 reported by PEIGNOT Kévin
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

When I want nautilus to sort items by names, there seems to be an error when file names have " - " inside (see screenshot).

I expected here to have 2011-04 to 2011-12 and then 2012-01 to 2012-07, but it sorted these to pack in the reverse order : 2012-01 to 2012-07 and 2011-04 to 2011-12 (a non natural order as 2011 is before 2012).

These are years-monthes, and to resume, it sorts well the monthes, but not the years.

To reproduce this bug, create a few files with the same names as in the screenshot and sort by name.

The problem occurs too if I ask the reversed order.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: nautilus 1:3.4.2-0ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Wed Aug 15 20:51:29 2012
GsettingsChanges:
 org.gnome.nautilus.window-state geometry '928x499+59+24'
 org.gnome.nautilus.window-state maximized true
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: nautilus
UpgradeStatus: Upgraded to precise on 2012-04-07 (129 days ago)

Revision history for this message
PEIGNOT Kévin (kpeignot) wrote :
Revision history for this message
BenHagan (smooth-texan) wrote :

Works normally for me. Can anyone else reproduce this?

Revision history for this message
PEIGNOT Kévin (kpeignot) wrote :

Maybe it's because I'm in French language, I can't test here in English (this computer is my brother's one and I can't use it enough)

Revision history for this message
Lisa Schmidt (boxnotify) wrote :

Yes, I can reproduce this. Sorting doesn't work properly. I use Ubuntu 12.04 64-bit.

It always fails when there is a dash involved. Then Ubuntu uses a totally messed up sorting system. In the following example, Ubuntu sorts according to the character that comes after the dash, but ignoring the previous character(s).

For instance:

Samurai I.txt
Samurai II.txt
Samurai III.txt

Now add a dash and characters following after the dash.
Then Ubuntu will scramble the order:

Samurai II-Duel.txt
Samurai III-Duel.txt
Samurai I-Musashi.txt

Ubuntu now orders according to the words "Duel" and "Musashi" instead of first keeping the sorting of the preceeding "I", "II" and "III". If you use a period "." instead, then the sorting is correct. But if a dash is involved, then Ubuntu fails to sort properly.

See screenshot attached.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
Lisa Schmidt (boxnotify) wrote :

By the way, I use English Ubuntu (US-English). But I have German keyboard setting. Don't know if that has any effect. Just mentioning it, because the original thread starter is on a French system and the other guy said he doesn't have this problem.

Revision history for this message
Lisa Schmidt (boxnotify) wrote :

Update:

I just found out that it also fails without the dash.

It will still sort like this:

Samurai II Duel.txt
Samurai III Duel.txt
Samurai I Musashi.txt

So obviously the problem is with I, II, III followed by a space character. Obviously the space character has priority before a real letter character. Ubuntu fails completely to do basic sorting. Only if you add "." after I, II, III, only then it sorts properly. It's a mystery to me. Such basic thing should work. I hope this gets fixed. Because this tiny thing makes Ubuntu very hard for me to do effective work when confronted with messed up sorting of my daily files.

Changed in nautilus (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks Kevin, I can't confirm that issue on a french locale here ... do you get that if you create a new directory with some files named "2012 - 01.txt" "2012 - 02.txt" "2011 - 06.txt"?

Lisa, your issue seems a different one and similar to some previously reported bugs like bug #322271 or https://bugzilla.gnome.org/show_bug.cgi?id=355152

Revision history for this message
PEIGNOT Kévin (kpeignot) wrote :

I created a new folder TEST on my desktop, with files named 2011 - 06.txt to 2012 - 03.txt, it ordered it well. I renamed them by deleting the "space" ("2011 - 06.txt" becoming "2011-06.txt") for each file, it works too.

I verified in the original folder of the bug, it's still buggy, but these one are pdf files (except the other folder, it's the only difference I see)

Revision history for this message
John Rose (johnaaronrose) wrote :

I confirm this bug. Attached screenshot (folder only with files in it) shows this.

Revision history for this message
gambr (gambr) wrote :

I can reproduce a similar orde issue.

Example:

2012040X
20100506
20100709

After two years a basic error like this must be fixed ...

Revision history for this message
Antonios Hadjigeorgalis (antonioshadji) wrote :

I have similar issues but with folders as shown in image. 01 folder should come first but does not. It does show first in terminal but not in Nautilus.

I'm running 14.04.3 64 Bit with the following locale settings.
`
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=en_GB.UTF-8
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
`

Revision history for this message
Chris S. (r-chris-2) wrote :

I'm having this problem right now. Ubuntu 15.10, Nautilus 3.14.2. Any sort order I pick in the preferences does nothing in Icon View. I have a desktop where this is not an issue, and I don't know what's different about the two.

Revision history for this message
Romain Bousson (romainbousson) wrote :

same issue, ubuntu 14.04, nautilus 3.10.1, fr_FR.UTF-8 for all LC_***.
I tested with LC_COLLATE=C or POSIX : the behaviour is slightly different, but I can't get a true classic alphanumeric sorting.

Would it be possible to implement a checkbox option on the Nautilus Preferences menu, in order to select :
- keeping the "intelligent (or not so) nautilus sorting type"
- use a regular alphanumeric sorting.

That would be so great.
I a m not used to the collaborative nautilus developpment, so where can I post this feature demand ?
Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.