Peder
Peder

Reputation: 11

utf8 encoded urls in rails 2.3.4

I just upgraded Rails to 2.3.4. Before the upgrade rails was ok with international characters in urls, but it isn't working anymore.

How do I get the following to work with rails 2.3.4:

ActionController::Routing::Routes.draw do |map|
    ...
    map.connect 'ö', :controller => 'test'
    ...
end

If I change 'ö' to 'o' it works, but thats not what I want.

Thanks, Peder

Upvotes: 1

Views: 198

Answers (1)

btw
btw

Reputation: 7154

CGI::escape seems like a quick fix to me.

ActionController::Routing::Routes.draw do |map|
  map.connect CGI::escape("ö"), :controller => 'test'
end

Upvotes: 1

Related Questions