开发者

How to use german umlaute in rails3 routes

开发者 https://www.devze.com 2023-01-05 22:57 出处:网络
really big problem example request http://localhost:3000/freund/in/münchen my first route in routes.rb match \':category/in/:city\' => \'home#index\', :constraints => {:city => /(berlin|h

really big problem example request

http://localhost:3000/freund/in/münchen

my first route in routes.rb

match ':category/in/:city' => 'home#index', :constraints => {:city => /(berlin|hamburg|münche开发者_StackOverflown)/ }

and I get the error Routing Error

No route matches "/freund/in/m%C3%BCnchen"

what can I do? I postet everywhere :(


"Real" Unicode characters in URLs are invalid. They usually get percent encoded by the browser, which results in m%C3%BCnchen. You will need to check for that inside Ruby.

This question provides more background: Unicode characters in URLs

0

精彩评论

暂无评论...
验证码 换一张
取 消