As described here, if the comic container doesn't follow the use of preceding zeros for all positions (example: using 01 rather than 1) then the viewer rearranges the pages. Most of the desktop readers ignore this & correctly display the page sequence. Can it be possible to fix this in the next update?
I've prepared a dummy CBZ file as example: http://ge.tt/8c4a25h2
Please notice the page number footer to get the rearranging issue.
+1 for natural sort order support.
This issue was recently brought up again on the forum, where @kjk replied:
Can you post a sample of the actual file names inside the .cbz file?
The problem here is that there are various ways to sort the names and a heuristic that works for one case might not work for another.
@kjk You can see the file linked to above for an example. Basically unless the requisite padding with leading zeroes is present Sumatra gets the sort order wrong. So we end up with something like 1.png, 10.png, 11.png, 2.png instead of the obvious correct (for humans) order.
You can see the references list of the Wikipedia article I've linked to above for more details if required. Martin Pool's algorithm might also be of interest to you: https://github.com/sourcefrog/natsort
Finally, I just want to note that even Windows Explorer has used natural sort by default since XP was released more than a decade-and-a-half ago, and every other decent modern sequential image viewer/comic book reader I know of has been using natural sort for ages.
Link to another discussion on the new forum.
This should be closed now. see https://github.com/sumatrapdfreader/sumatrapdf/pull/1060
Awesome, looking forward to the next stable release with this fix. :)
Looks like #1060 didn't fix this after all. :(
Forum discussion here @kjk @glachancecmaisonneuve
P.S. Here are 10 archives (2 each for 7z/CB7, RAR4/CBR, RAR5/CBR, TAR/CBT and ZIP/CBZ) for testing. The "Good" ones have all the images inside in proper order (pages 1 to 10), whereas the "Bad" ones have been created specifically with the images in the wrong order (pages 6 to 10, then 1 to 5).
Should be fixed by https://github.com/sumatrapdfreader/sumatrapdf/commit/87925939115ab8ee758045c9331cc4236d27497f available in latest pre-release https://www.sumatrapdfreader.org/prerelease.html
Most helpful comment
This should be closed now. see https://github.com/sumatrapdfreader/sumatrapdf/pull/1060