WzComparerR2 icon indicating copy to clipboard operation
WzComparerR2 copied to clipboard

Feature Request: Case-insensitive image sorting

Open PirateIzzy opened this issue 1 year ago • 2 comments

In the CMS build, IMG sorting is case-sensitive, meaning that it sorts by uppercase, and then by lowercase. Image

In the KMS build, IMG sorting is case-insensitive due to a feature in Wz_Node: Image

https://github.com/KENNYSOFT/WzComparerR2/commit/c9e627a6dc47b483c8e45339b1101f4a69b4418a

Could we add this to the CMS build as well? Whether it's exactly like this or if you know a better method is up to you. Alternatively, we can add an option to choose how to sort IMGs, between these two methods.

PirateIzzy avatar Feb 15 '25 04:02 PirateIzzy

StrCmpLogicalW is quite heavy and also causes WzLib to lose cross-platform compatibility. However it is a better choice for human readability,and it can also corectly sort acc1, acc2, acc3 ...acc10, acc11.

We can design an external string comparer or a full managed implementation of lexicographical_compare, we can try to add it as an option.

Kagamia avatar Feb 15 '25 05:02 Kagamia

Just an addendum, the Sort by IMG option also allows you to turn StrCmpLogicalW sorting on / off: Image

PirateIzzy avatar Feb 17 '25 04:02 PirateIzzy