Hi! I am building a search function for my website. I am using Kirby 3.5 rc4.
When searching text with Swedish special characters (åäö) I don’t get any results from fields which store their content in JSON format (like the new blocks field, and the old editor). I.e. ä is stored as \u00e4 so for example searching “vänster” doesn’t yield any results.
I found this thread and used the following “hack” from that thread: $encoded_query = trim(json_encode($query), '"');
That solves it but then the search doesn’t work for regular fields like textarea where special characters are stored normally (despite what’s stated in the thread). Does anyone have an idea how to solve this? Thanks.
Would be nice to mention this in the docs!
It took me quite a while to find this solution. In the docs it just says ‘Saves pretty printed JSON in text files’. But it seems like nowhere is mentioned that this is essential to find words with special chars. The search is a very basic function and I think this should work out of the box or at least being documented in the official docs.