rails/rails — Issue #3470: i18n routes can't be recognized
Author: kuraga
Created: 2011-10-30 16:04:56+00:00
State: open

It seems the situasion described here: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4896 is still aactual.

So, Rails correctly creates and stores utf-8 based routes. But when it comes to route recognition, it fails to match the route name:

get 'начало', controller: :home, action: :index

then

http://localhost/%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%BE

gives

No route matches "/%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%BE" with {:method=>:get}

The reason is that recognize_path does html unescape only after routes are mapped, and because of this it fails to map raw utf8 stored name against its %XX%XX equivalent.

Is this a bug? Can somebody help with this?