diff --git a/routing/requirements.rst b/routing/requirements.rst index 1cf881203e8..1538a126bb1 100644 --- a/routing/requirements.rst +++ b/routing/requirements.rst @@ -159,6 +159,17 @@ Path Parameters ``/es`` *won't match this route* ======= ======================== +.. note:: + + Since Symfony 3.2, you can enable UTF-8 route matching by setting the ``utf8`` + option when declaring or importing routes. This will make e.g. a ``.`` in + requirements match any UTF-8 characters instead of just a single byte. + The option is automatically enabled whenever a route or a requirement uses any + non-ASCII UTF-8 characters or a `PCRE Unicode property`_ (``\p{xx}``, + ``\P{xx}`` or ``\X``). Note that this behavior is deprecated and a + `LogicException` will be thrown instead in 4.0 unless you explicitly turn + on the `utf8` option. + .. tip:: The route requirements can also include container parameters, as explained @@ -287,3 +298,5 @@ Adding Dynamic Requirements with Expressions For really complex requirements, you can use dynamic expressions to match *any* information on the request. See :doc:`/routing/conditions`. + +.. _`PCRE Unicode property`: http://php.net/manual/en/regexp.reference.unicode.php