python - Tornado url regex unicode chars -


i have tornado application, url

https://example.com/my/path/❤

in tornado have

handlers = [         (r'/my/path/❤$', myhandler), ] 

but not matching path.

i tried tornado.escape.utf8() , tornado.escape.url_escape() no luck.

if replace %e2%9d%a4 encoded string of works possible make work without replacing encoded string?

no, tornado's routing engine works on encoded form of urls, impractical use non-ascii characters in routes. (they work fine if captured variable part of path, r'/my/path/(.*)' correctly capture , pass first argument handler).

handling unicode routes longstanding feature request, difficult solve correctly because of complexity of rules defined in rfc 3987.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -