Skip to content

Commit c53742f

Browse files
Add doc about unicode requirements
1 parent a7f704c commit c53742f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

routing/requirements.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ Path Parameters
159159
``/es`` *won't match this route*
160160
======= ========================
161161

162+
.. note::
163+
164+
Since Symfony 3.2, requirements can be prefixed by the ``*`` character to
165+
enable Unicode matching, thus making ``.`` match any UTF-8 character instead
166+
of just a single byte. Unicode matching is also automatically enabled
167+
whenever the route or a requirement contains a non-ASCII UTF-8 character or
168+
a `PCRE Unicode property`_ (``\p{xx}``, ``\P{xx}`` or ``\X``).
169+
162170
.. tip::
163171

164172
The route requirements can also include container parameters, as explained
@@ -287,3 +295,5 @@ Adding Dynamic Requirements with Expressions
287295

288296
For really complex requirements, you can use dynamic expressions to match *any*
289297
information on the request. See :doc:`/routing/conditions`.
298+
299+
.. _`PCRE Unicode property`: http://php.net/manual/en/regexp.reference.unicode.php

0 commit comments

Comments
 (0)