I have a Kirby installation with virtual pages from a database following the recipe here.
One of the tables contains a list of international artists and some of them have Umlauts/Accents in ther Names, e.g. “Ábalos”.
I am converting the DB-result to pages and assigning the name as the title for the page following the recipe above like so:
foreach ($result as $artist) {
$artists[] = [
'slug' => $artist->kirby_slug(),
'num' => $num, //$artist->kirby_status() === 'listed' ? 0 : null,
'template' => 'artist',
'model' => 'artist',
'content' => [
'title' => $artist->$name() ?? 'New Artist',
…
In the panel all artists should be sorted alphabetically (num: zero), and the result from the DB is in the expected order, but somehow Kirby messes up the sorting when it does it’s magic:
In the panel, the artist named “Ábalos” appears as the last in the list of all artists. Somehow this is related to character encoding i guess, as a test made with a plain-kit and “normal” pages works fine. so i started fiddling around with converting the charset when assigning the title
'title' => iconv('UTF-8','ASCII//TRANSLIT', $artist->$name()) ?? 'New Artist',
which fixes the sorting but leads to the accent being stripped.
Any idea how i could tackle this?