#82 Sort order for previous/next page is wrong

open
nobody
None
5
2012-09-19
2012-09-19
Stephan Sokolow
No

When I get to the end of a file like bar.cbz and then scroll or press spacebar, I start into foo.cbz rather than bar2.cbz because bar2.cbz sorted before bar.cbz.

As far as I can tell, Comix is using a localized-but-naive alphabetical or lexicographic sort (not sure which) for determining the order of files within a directory for the purpose of switching between them.

The file open dialog does it correctly but, as far as I can guess, the function GTK+ uses is g_utf8_collate_key_for_filename, which isn't exposed in Python. The terms you'll want to search for are "natural sort" and "human sort".

Discussion