Unicode in url patterns

133 views
Skip to first unread message

giolekva

unread,
Sep 29, 2009, 1:41:52 PM9/29/09
to Tornado Web Server
Hi, how can I use unicode in my urls?

For example in blogs app if I want slug field to be unicode, it gets
strange value like %E1%83%90%E1%83%A1%E1%83%93 which stands for ასდ
(it's Georgian).

Thanks.

Bret Taylor

unread,
Sep 30, 2009, 3:36:32 PM9/30/09
to python-...@googlegroups.com
We have not worked on unicode in URLs. If you end up working on it and find issues/bugs, please let us know or submit a patch. As far as I know, you are the only person who has brought up this feature, so I am sure there will be issues.

Bret

giolekva

unread,
Oct 1, 2009, 3:19:57 AM10/1/09
to Tornado Web Server
I've made patch which works for me. Here it is:
http://github.com/giolekva/tornado/commit/d2afe50b540216b9fdee821448757d339df9c011
please check it.

On Sep 30, 11:36 pm, Bret Taylor <btay...@gmail.com> wrote:
> We have not worked on unicode in URLs. If you end up working on it and find
> issues/bugs, please let us know or submit a patch. As far as I know, you are
> the only person who has brought up this feature, so I am sure there will be
> issues.
>
> Bret
>

Patrick Vergain

unread,
Oct 1, 2009, 4:41:52 AM10/1/09
to python-...@googlegroups.com

Hello,

Just for information, maybe these links can also be usefull:
- http://code.google.com/p/httplib2/source/browse/httplib2/iri2uri.py
- http://blog.elsdoerfer.name/2008/12/12/opening-iris-in-python/
- http://www.gnu.org/software/wget/manual/wget.html (1.12 Saint Xavier—Support for IRIs (RFC 3987)
  · Added support for Internationalized Resource Identifiers (IRIs, RFC 3987). When support is enabled
   (requires libidn and libiconv), links with non-ASCII bytes are translated from their source encoding
   to UTF-8 before percent-encoding. IRI support was added by Saint Xavier,
   as his project for the Google Summer of Code.)
- http://www.ietf.org/rfc/rfc3987.txt

--
Patrick

Reply all
Reply to author
Forward
0 new messages