orderby="title" does not work properly in WP_Query
|Reported by:||jobjorn||Owned by:|
I am running a homemade plugin that displays an alphabetical post index. It didn't take me long to notice that "Äppelpaj med knäcktäcke" was sorted immediately after "Ajvarpasta med solrosfrön", that is, Ä after A rather than at the end of the alphabet - the swedish alphabet is like the english one but with three extra letters, Å Ä Ö, at the end. Since I did not really expect WordPress to handle the quirks of all languages, I ignored this.
However. It soon turned out that "Asiatisk gryta med tofu och plommon" was sorted after "Äppelpaj med knäcktäcke", meaning that the sort goes AÄA. Ä is treated as an A by WordPress.
In the get_posts loop, I'm adding a new header for each letter, based on when the first letter of the post changes from the first letter of the previous post. But since WordPress seems to treat Ä as A, and PHP rightly does not, I end up with two "A" headers with an "Ä" header in the middle.
This can't be right, can it?
I'm attaching my little (not entirely finished) plugin.