Scandinavian character support in url management


The Scandinavian characters do not seem to work in the url management (probably CUrlRule does not support them).

I have the following config:













All urls work except when <name> contains Scandinavian characters. For example the following url does not work:


which is decoded to:


Do you know how I can fix this? I don’t want to remove or convert the Scandinavian characters as it would not be very good for the SEO…

Make sure the characters are encoded the same way in the database… else it will not find it :) I would advise instead using name… use a slug column with url safe characters for finding data.


Actually UrlRule should support Unicode characters. If you check the constructor code of CUrlRule, you see that the u modifier is added to every rule regex. Maybe you can do some debuggging to find out, why it’s not applied correctly in your case?

Sorry for not answering sooner. Thank you very much for your replies! The encoding should have crossed my mind!

The database is very old and is unfortunately not in utf8. I made the decision to change the url to only valid characters. I replace Å,Ä,Ö to A, A, O and so on…