# Title sorting with Roman Numerals

**URL:** https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965
**Category:** Support
**Created:** [August 28, 2023, 7:54pm UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965 "2023-08-28T19:54:21Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jcwood72](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jcwood72](https://community.mp3tag.de/u/jcwood72)
#### Post date: [August 28, 2023, 7:54pm UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/1 "2023-08-28T19:54:21Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 28, 2023, 8:11pm UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/2 "2023-08-28T20:11:22Z")

</div>

It works if you replace the hyphen with a space.

I just checked in MS Word - and it also sorts

> [@jcwood72](#):
>
> Bassoon Concerto in F, RV 486; I-Allegro  
> Bassoon Concerto in F, RV 486; III-Allegro  
> Bassoon Concerto in F, RV 486; II-Largo

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

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [August 29, 2023, 10:23am UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/3 "2023-08-29T10:23:00Z")

</div>

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".)_

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [August 29, 2023, 1:24pm UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/4 "2023-08-29T13:24:19Z")

</div>

> [@LyricsLover](#):
>
> Maybe @Florian can tell us the sort logic behind/with Roman Numerals?

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

> [@Sort by Filename Seems to Ignore Case and Strip Hyphens](https://community.mp3tag.de/t/sort-by-filename-seems-to-ignore-case-and-strip-hyphens/60541/9):
>
> This is a speciality of some Windows sorting algorithms, which employ something called word sort technique. In this type of sort, all punctuation marks and other non-alphanumeric characters, except for the hyphen and the apostrophe, come before any alphanumeric character. The hyphen and the apostrophe are treated differently from the other non-alphanumeric characters to ensure that words such as "Boi-Ngo" and "Boingo" stay together in a sorted list. You can see this live in action by creating …

---

<div class="post-metadata">

### Author: ![jcwood72](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jcwood72](https://community.mp3tag.de/u/jcwood72)
#### Post date: [August 30, 2023, 12:39am UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/5 "2023-08-30T00:39:52Z")

</div>

Thanks. I will try that.

---

<div class="post-metadata">

### Author: ![jcwood72](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jcwood72](https://community.mp3tag.de/u/jcwood72)
#### Post date: [August 30, 2023, 12:41am UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/6 "2023-08-30T00:41:29Z")

</div>

Thanks for the explanation. I will use the workaround.

---

<div class="post-metadata">

### Author: ![jcwood72](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jcwood72](https://community.mp3tag.de/u/jcwood72)
#### Post date: [August 30, 2023, 12:43am UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/7 "2023-08-30T00:43:54Z")

</div>

That's some interesting info. Thanks.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:30pm UTC](https://community.mp3tag.de/t/title-sorting-with-roman-numerals/61965/8 "2026-02-09T12:30:08Z")

</div>


