In Zend Framework 2, I am trying to use a route with UTF8 characters in it but am not having any luck. When using UTF8 characters, I always get the error “The requested URL could not be matched by routing.”
My route looks like this:
'contact-us' => array(
'type' => 'literal',
'options' => array(
'route' => '/kundtjänst/',
'defaults' => array(
'controller' => 'contact-us',
'action' => 'index',
),
),
),
And I am certain that it is the “ä” character that is giving me problems since when I take it out (and change the URL), it works. How can I use these characters (Swedish, Norwegian, and Estonian) in routes with ZF2?
You should use urlencoded characters: