Title sorting with Roman Numerals

I have a number of Classical pieces with titles such as:

Bassoon Concerto in F, RV 486; I-Allegro
Bassoon Concerto in F, RV 486; II-Largo
Bassoon Concerto in F, RV 486; III-Allegro

When I sort by title in ascending order I get:

Bassoon Concerto in F, RV 486; I-Allegro
Bassoon Concerto in F, RV 486; III-Allegro
Bassoon Concerto in F, RV 486; II-Largo

where III always comes before II. I have version 3.22, but have noticed this in previous versions. Now, I realize that with more movements in a piece IX will come before V in an alphabetical sort, but that is not my concern here.

It works if you replace the hyphen with a space.

I just checked in MS Word - and it also sorts

And I checked in Word also these strings- and the outcome of sorting them:
Bassoon Concerto in F, RV 486; I-Allegro
Bassoon Concerto in F, RV 486; III-Allegro
Bassoon Concerto in F, RV 486; IIII-Allegro
Bassoon Concerto in F, RV 486; II-Largo
Bassoon Concerto in F, RV 486; IV-Allegro

As soon as the hyphen is replaced with a space, the strings are sorted like this:

Bassoon Concerto in F, RV 486; I Allegro
Bassoon Concerto in F, RV 486; II Largo
Bassoon Concerto in F, RV 486; III Allegro
Bassoon Concerto in F, RV 486; IIII Allegro
Bassoon Concerto in F, RV 486; IV Allegro

There seems to be some (yet unknown) sort logic with Roman Numerals.

If you try to sort the second entry
Bassoon Concerto in F, RV 486; II-Largo
with a manually added letter from A to H as
Bassoon Concerto in F, RV 486; II-ALargo
Bassoon Concerto in F, RV 486; II-BLargo
Bassoon Concerto in F, RV 486; II-HLargo
Mp3tag sort it correctly. **

But starting with the uppercase letter i
Bassoon Concerto in F, RV 486; II-ILargo
Bassoon Concerto in F, RV 486; II-KLargo
some strange sort logic seems to interfere.

Maybe @Florian can tell us the sort logic behind/with Roman Numerals?

**
(Mp3tag sort it also correctly if you swap the word "Largo" with "Allegro".)

Unfortunately not. I'm using StrCmpLogicalW for natural sorting which is intentionally undocumented by Microsoft and might change behavior from release to release.

I'm moving this to Support. I don't see it as a bug, @ohrenkino outlined a workaround, and I also don't plan to change the sorting behavior. Regarding the special treatment of hyphens, I've written some explanation in this topic

1 Like

Thanks. I will try that.

Thanks for the explanation. I will use the workaround.

That's some interesting info. Thanks.