Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Is this a router's bug?(urls, including chinese words, could not been parsed!)

In router file, I set the route as follow,


yet when I navigate to url: “http://standard.zhaobing/search/内建”, matched router is null , while "http://standard.zhaobing/search/架构" is OK, and searchs for english words are OK too.

Can anyone give a tip?

I'm using WAMP 64bit, php5.6.16 64bit; phalcon 2.1.0b;

edited Feb '16

Have fixed this bug! need urldecode($request->getURI())

$eventsManager = new \Phalcon\Events\Manager();
$eventsManager->attach("dispatch:beforeDispatchLoop", function($event, \Phalcon\Mvc\Dispatcher $dispatcher){

    $router = \Phalcon\Di::getDefault()->get('router');
    if(null == $route) {
        $request = new \Phalcon\Http\Request();
        $route = $router->getMatchedRoute();
        if(null == $route) die('url地址无效,找不到对应的路由设置!');

    ... ...

edited Feb '16

Found another solution, in router file:

use Phalcon\Mvc\Router;
$router = new myRouter(false);
$router->setUriSource(Router::URI_SOURCE_SERVER_REQUEST_URI); // Use $_SERVER['REQUEST_URI'] 
... ...