juxt / bidi

Bidirectional URI routing
MIT License
993 stars 90 forks source link

Non-ASCII characters as path parameters #206

Open ghost opened 3 years ago

ghost commented 3 years ago

Bidi supports matching non-ascii characters in path patterns, but does bidi support non-ascii as path parameters?

(def routes
  ["/" [["Йцукен" [["" :just_qwerty]
                   [["/" :id] :qwerty_and_more]]]]])

(bidi/match-route routes "/Йцукен")
;; => {:handler :just_qwerty}

(bidi/match-route routes "/Йцукен/And_more")
;; => {:route-params {:id "And_more"}, :handler :qwerty_and_more}

(bidi/match-route routes "/Йцукен/Не_работает")
;; => nil