Review Request: Add global option to turn off "natural sorting" of user visible strings.

Peter Penz peter.penz at gmx.at
Tue Aug 18 00:04:12 BST 2009


On Tuesday, 18. August 2009 00:41:40 Peter Penz wrote:
> On Tuesday, 18. August 2009 00:20:47 Matthew Woehlke wrote:
> > (see subject)
> >
> > While you're looking at this, any chance of fixing natural sorting where
> > it is currently broken?
> > Specifically, sorting of hexadecimal or other
> > base-greater-than-10 numbers? (I have at least one directory of stuff
> > that is base-36 numbering, that sorts very wrongly. Actually, this makes
> > something of an argument for per-directory options...)
>
> Natural sorting is not "broken" in this case. There is no way for the
> compare function to know the semantics of a string: Should F1.jpg be
> handled as a hexadezimal value or not?

Sorry, I think my reply was unclear. What I meant: You can either turn off 
"natural sorting" (-> hexadecimal filenames are sorted "correct" then) or turn 
it on. But there is nothing that must be fixed in the algorithm "natural 
sorting" itself.

>
> I'm really against a per-directory option, as this hexadezimal-example is a
> corner case for a small group of users which does not justify a user
> visible UI option "[x] Natural Compare" inside a top-level-menu IMO.
>
> My problem in this discussion: I'm sure on kde-core-devel there are a lot
> of participants of this small group ;-)




More information about the kde-core-devel mailing list