Teemu Valimaki wrote:

Yes, you're absolutely right. The default regex was accepting a limited range of characters. I have modified it to use all UTF letters now.
Please, give it a try.
I'm having doubts if I'm using this incorrectly because it still doesn't
work. If I have a router set for /test/:name and call it with /test/ä it
does not work. So I tried to urlencode ä to %C3%A4 but this doesn't work
either, IndexController noRouteAction is called instead.

Are you absolutely sure you're using latest svn _incubator_ version of the router? How is your include path set?

This works on my setup:

Bootstrap:
----------

$router = new Zend_Controller_RewriteRouter();
$router->removeRoute('compat');
$router->addRoute('utf', new Zend_Controller_Router_Route(':name',
   array('controller'=>'index', 'action' => 'index')));

$controller = Zend_Controller_Front::getInstance();
$controller->setRouter($router);

$request = new Zend_Controller_Request_Http();
$request->setBaseUrl('/test');

$controller->setRequest($request);

$controller->setControllerDirectory('controllers');
$controller->dispatch();


indexAction of IndexController:
-------------------------------

var_dump($this->getRequest()->getParams());
var_dump($this->_getParam('name') === 'ä');

Result:
-------

array(3) {
  ["name"]=>
  string(2) "ä"
  ["controller"]=>
  string(5) "index"
  ["action"]=>
  string(5) "index"
}

bool(true)

--
Michael Minicki aka Martel Valgoerad | [EMAIL PROTECTED] | 
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"If you tell the truth you don't have to remember anything." -- Mark Twain

Reply via email to