We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Help with japanese url

Hi all.
I'm experiencing a strange behaviour with the routing in my site
I want to intercept this path: /ja/firenze/教会と宗教的なサイト/サンタ・クローチェ教会-other-text
My router rule is:

              '/{language:[a-z]{2}}/{slug:[\p{L}-a-z-0-9\-]+}/{slug2:[\p{L}-a-z-0-9\-]+}', [
              'module' => 'frontend',
              'controller' => 'index',
              'action'     => 'index',

and It give a 404.
if I try with this: /ja/firenze/other-text it's ok.
if I try: /ja/firenze/フィレンツェ-other-text it's ok
if i try: /ja/フィレンツェ/other-text-フィレンツェ it ok


Don't know if it helps (I know nothing about japanese) but if I delete the it works. So the problem is about this sign and similars.

edited Aug '18

probably itsn't a character of unicode \p{L} wildcard

check this regexp