0.61: Sort by Extension inconsistency

*** Please report new bugs here! ***

Moderator: Dreamer

Post Reply
daisensou
Posts: 9
Joined: Mon May 23, 2011 5:36 pm

0.61: Sort by Extension inconsistency

Post by daisensou »

Unlike Linux (and Mac?), Windows does not discern from lowercase\UPPERCASE and since it doesn't really impact the system usage in any way, it's pretty negligent regarding the extension case (some applications will only create files with lowercase extensions, others, like the Snipping Tool will use UPPERCASE extensions by default[/b]). This can lead to some inconsistencies, worse if the user has the file extensions hidden (default Windows setting), as the behavior will seem random. So, while this behavior may be useful on other platforms, it's just confusing on Windows.

This is a somewhat long explanation (and convoluted!), so to keep it simple: XnviewMP treats .lowercase and .UPPERCASE (or mixed .CaSE) extensions differently, which sorts files into a nonsensical order


- When using Sort by Name, xnview ignores the filename case, i.e. file01.jpg will be listed before FILE02.jpg. Just like the Windows system.
Image


- When using Sort by Extension, xnview will treat lowecase extensions differently from UPPERCASE extensions (or mixed, i.e. .PNG = .pNg = .pNG != .png).
Image


As I tested here, the behavior is really random, I first spotted it because it was placing all files with UPPERCASE extensions before the files with lowercase extensions. Now during the new tests (images above and below created today), the files with different extension cases will be sorted at 'random' either at the beginning\middle or end. Refreshing (F5) will make files alternate position:

- Upon pasting into a new folder
Image


- Refreshed once (the .png and .jpg images will change order)
Image


- Refreshed again (.jpg files will settle and only the .png files will alternate position)
Image


In my tests, I used only a few files, but if I try it on a folder with hundreds of files, the behavior will be similar.

- If I make copies of the images (Select files > Ctrl+C > Ctrl+V) and refresh, their position will change again (the copies "Copy of ..." will be sent to somewhere in the middle of the folder - i.e. between filenames starting with K).
- If I change view to another folder and then come back, their position will change once again and they'll be located somewhere in the beginning of the folder (i.e. between cyrilic filenames, starting with И - which is another anomaly... shouldn't these be listed after the normal chars 0-9,aA-zZ?).

EDIT:
Under Ubuntu (running on VirtualBox), surprisingly, it treats them as equal (Sort by Extension > Ascending)
Image
Windows 7 64bit / XnViewMP Version 0.61 (Jul 18 2013) x64
User avatar
xnview
Author of XnView
Posts: 34700
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Sort by Extension inconsistency

Post by xnview »

ok, right
Pierre.
User avatar
xnview
Author of XnView
Posts: 34700
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.61: Sort by Extension inconsistency

Post by xnview »

Pierre.
Post Reply