Files with spaces in the name are sorted differently in exports compared to within mp3tag?

Files with spaces in the name are sorted differently in exports compared to within mp3tag.

Steps to replicate:

  1. Prepare a folder with two files that can be opened in mp3tag. (Give the files some metadata, so that you can identify which is which later.)
  2. Name one of them anything. For example, "File".
  3. Name the other the same thing, but with a space afterward. For example, "File ".
  4. Open the folder in mp3tag.
  5. Sort the files by filename, ascending. (There's an arrow pointed up on the filename header)
  6. Export to text file.
    -> The files are not in the same order in the export.

Here's an example:


The top is four files within mp3tag. The text document is the export.

When you export tags in mp3tag, they are always sorted by filename, no matter the sorting within mp3tag. However, spaces are treated differently between mp3tag and the export. (As you can see, "Lake" and "Lake Caverns" are not in the same order.) As a result, the files within mp3tag can't be put in the same order as the export. This makes it difficult to re-import tags.

It would make more sense if spaces were treated the same in these two cases. It doesn't matter which file comes first, it should just be consistent.

This issue was reported before (kind of) here:

The user found a way of working around this issue in their case, but I don't think that means it shouldn't be fixed.

I don't know what should be fixed.
Please check your column definition by which property you sort: %_filename% or %_filename_ext% and then check your export script by which variable you loop there.
The variables have to be the same for column and export script.

Well, I feel silly. Thanks.

Dear mods, please move this thread to Support. Or better yet, delete my shame.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.