bidi icon indicating copy to clipboard operation
bidi copied to clipboard

Non-ASCII characters as path parameters

Open ghost opened this issue 5 years ago • 0 comments

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

ghost avatar Dec 22 '20 19:12 ghost