I absolutely agree!
But after spending some time figuring out the function described above, I realized that is not that simple. For example PostgreSQL doesn’t just sort by whatever character set / encoding you decide to pick. It first removes spaces and other stuff, then orders, then breaks ties with whatever had been removed. Well, kinda. That’s why my order_by
function returns a tuple, not just one string.
I have never used PostgreSQL, but I don’t think we are the first ones to have this problem. I hope that there is already a library out there that does the job that I tried to do and it does it better. While I wait for the Anvil staff to show us how to use that library (or to make it if doesn’t exist), I will try to live in the ASCII range.