Skip to content

Commit

Permalink
Add doc about unicode requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 19, 2016
1 parent a7f704c commit b2154f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions routing/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ Path Parameters
``/es`` *won't match this route*
======= ========================

.. note::

Since Symfony 3.2, requirements can be prefixed by the ``*`` character to
enable Unicode matching, thus making ``.`` match any UTF-8 character instead
of just a single byte. Unicode matching is also automatically enabled
whenever the route or a requirement contains a non-ASCII UTF-8 character or
a `PCRE Unicode property`_ (``\p{xx}``, ``\p{xx}`` or ``\X``).

.. tip::

The route requirements can also include container parameters, as explained
Expand Down Expand Up @@ -287,3 +295,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

0 comments on commit b2154f8

Please sign in to comment.