]> git.openstreetmap.org Git - rails.git/blob - config/initializers/router.rb
4357a87f25f47ea0cc98c8da6d9f155ed8dad750
[rails.git] / config / initializers / router.rb
1 # Some versions of ruby seem to accidentally force the encoding
2 # as part of normalize_path and some don't
3
4 module OpenStreetMap
5   module Router
6     module ForceEncoding
7       def normalize_path(path)
8         super(path).force_encoding("UTF-8")
9       end
10     end
11   end
12 end
13
14 ActionDispatch::Journey::Router::Utils.singleton_class.prepend(OpenStreetMap::Router::ForceEncoding)