Help with sorting

Hello, Florian, I wish you success.
I want to request a fix for a feature in MP3Tag, which I think many will call futile, but for me it's very, very useful.
It's about more accurate alphabetical sorting.
What currently happens: the program interprets whitespace as if it were a character before the letter "a" and before the number zero. The sorting routine should "ignore" the whitespace.
For example, the correct order would be:

ABEL
ABELHA
ABÓBORA
A CASA
A DATA
AREA
AEREO
ALFABETO
ALFA ZEMA
ALFAZILDA

But the program orders (incorrectly):

A CASA
A DATA
ABEL
ABELHA
ABÓBORA
AEREA
AEREO
ALFA ZEMA
ALFABETO
ALFAZILDA

This also interferes with auto-numbering.
Thank you very much in advance.

I don't think that Mp3tag sorts AREA to AEREA (but that's maybe just a typo?)

Notepad++, for example, sorts your lists in exactly the same way that you describe as 'incorrect'.
What other software can sort the words in your list the way you want?

You could use the scripting function $replace() to remove the space characters (and any other character of which you think that it leads to an incorrect order).
For Columny you could enter the $replace() function in the column property "Sort by", in a format string, you could use
$sort($replace(...))

What you call incorrect is the generally used sorting in software. It also is the same like in Windows Explorer.
There is software that uses lexicographic sorting, mostly library software, but even there are country-specific rules.

There is an easy workround. Create a new tag field, calling it %titlesort% or something similar. Do this by adding the new field to your column view. Then fill that field with the text variants that you want to sort on. So, using your example, TitleSort fields would include these values:
CASA ...
DATA ...
etc.
Instead of A CASA and A DATA, etc.

Then copy over the non-variant title entries into the new tags as they are.
Now you can sort all "correctly" on TitleSort in column view.

This workaround is widely used for fields like AlbumArtist (AlbumArtistSort) and Artist (ArtistSort).

I don’t think this should be changed. You may call it a “fix”, but I think it works the way I expect.

@JoaoBC Plenty of good suggestions have been offered here with options to manage this as you wish.

I would not expect the current default sorting to change, given it is how most users would expect it to work as-is.

I would like to add that there is a general option to use "natural sorting" or not.
Perhaps this adds even more options to play with.

Hello! Thanks for your interest in helping.
Friend, I'm still a novice in this system.
Could you give a more explicit, detailed example? What I want is to sort by %artist% and %title%, disregarding whitespace.

But wouldn't this make "A Casa" come after "Abel" since "casa" starts with C?
(Or did I not understand what exactly to do)

Friend, in any language, when ordering a list by name, no blank space is considered,

Dude, I understand your point.
Imagine a song called "The House" and another called "Theatre." In a playlist, which one do you think should appear first? In my humble opinion, it would be "Theatre" first and then "The House," since the letter "A" comes before the letter "H." But in the mp3 tag, "The House" appears first and then "Theatre."

Hi!
Friend, I tested this.
Turning this "Natural sorting" option on or off didn't change anything.

Hi, my friend. Yes, most software works this way. But that's because the software understands whitespace as a letter that appears before any and all letters, symbols, etc.
The ASCII code for a space is 32, while for the letter "A" it is 65. If the code for a space were, for example, 255, the records with whitespace would be at the end of the file. As I mentioned before, mp3tag displays "The House" BEFORE "Theater" because, for it, the space comes before the letter "a," resulting in an incorrect classification.

Yes!
The dbfviewer 2002 software, which manages .dbf databases, has a modded version, which I requested from the author, that does this.
dbfmanager also does this. (Also at my request.)
(Both perfectly sort words with whitespace, as if the space didn't exist.)
www.dbf2002.com and www.dbfmanager.com

I would expect “The House” to come before “Theatre” every time.

Whitespaces inside of any title or name has a purpose. Even with a name like “Van Halen” that comes before “Vanessa Williams” in my library any day.

But hey, it is your library. Manage it any way you want. But since what you expect is not the norm, you have to figure out how to make the changes.

Yes, I misunderstood what you wanted. Otherwise, in %titlesort% simply remove the white space after a leading A wherever it occurs.

You can enter whatever works for you in %titlesort% because that column will only be used for sorting.

Check the column definition for e.g. the title and adapt it so that it looks similar to this:

You could append the $replace() statement in the "Sort by" property of the column so that it removes also articles.
$replace(%title%, ,,The ,,An ,)

Would it be like creating another field/column and filling it without spaces? But would this filling be manual (one by one)?