Routing with utf-8 characters


#1

I want to start routing with persian characters like “localhost/zend/public/محصولات”. how can I do that?
I found a solotion in [https://stackoverflow.com/questions/32824060/zend-framework-2-routing-with-utf-8-regex-pattern] but my question is in my controller class. what action name must use to handle the route ‘\محصولات’?
Apologize for bad English.
(https://stackoverflow.com/questions/32824060/zend-framework-2-routing-with-utf-8-regex-pattern)


#2

I had that issue recently and found that unicode segment router is not needed like stackoverflow posts suggests. Unicode characters are encoded by browser with %, and decoded by zend router (segment) using rawurldecode. Use segment router with “[\w%]+” constraint, that is enough.