8000 [Routing] add unicode support · Issue #5236 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Routing] add unicode support #5236
Closed
Closed
@Tobion

Description

@Tobion

As a reminder, the Routing component is not fully unicode aware. There are cases that work and some don't work.

Using a unicode string as content for a routing variable works currently, e.g. /{var} with var='€1' works as expected (except normalization, see below).
Unicode text inside the static route pattern can have some undefined behavior. So /€/{var} might work but /€{var} definitely doesn't work (as the character is considered as seperator and then mangled by non-multibyte functions).

For reference, a first, unfinished attempt at fixing this was made at #3629.

Implementing this would require some heavy research as to which byte functions (substr etc.) need to be replaced by their multibyte variants in the Compiler, Generator, Matcher, Dumper. And by doing so, not to decrease performance if possible.

Working with unicode, also requires to normalize the representation. So it generates/matches the same URL that only differs by unicode composition. See http://php.net/manual/de/class.normalizer.php

Other helpful resource: http://www.phpwact.org/php/i18n/utf-8

3D6B

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0